What's wrong with "char *p; *p = malloc(10);"?

Answer Posted / parasher

char *p;

p = (char *)malloc(sizeof(char));

Is This Answer Correct ?    8 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a node in c?

554


Why does everyone say not to use gets?

612


Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. z-a:zyx......ba -1-6-:-123456- 1-9-1:123456789987654321 a-R-L:a-R...L a-b-c:abbc

5063


What are the usage of pointer in c?

708


What is the difference between text and binary modes?

650






How do you redirect a standard stream?

628


Give basis knowledge of web designing ...

1580


What is a program flowchart and explain how does it help in writing a program?

682


Dont ansi function prototypes render lint obsolete?

612


What are all different types of pointers in c?

581


write a c programming using command line argument,demonstrate set operation(eg;union,intersection,difference) example output is c:>setop 12 34 45 1 union 34 42 66 c:>setop 12 34 1 42 66 c:>setop 12 34 diff 12 56 67 78 setop 12 34

1633


write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?

2415


Explain what is the difference between far and near ?

655


What is string constants?

664


How do we print only part of a string in c?

591