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

Answer Posted / guest

Function calls are not allowed in initializers for global or
static variables.

Is This Answer Correct ?    3 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain which function in c can be used to append a string to another string?

594


Create a simple code fragment that will swap the values of two variables num1 and num2.

817


What are the c keywords?

752


Explain what is the stack?

638


What is use of integral promotions in c?

668






Explain output of printf("Hello World"-'A'+'B'); ?

980


What is the deal on sprintf_s return value?

647


Which is the best website to learn c programming?

585


what do you mean by enumeration constant?

601


What are the 5 types of organizational structures?

554


Under what circumstances does a name clash occur?

695


What is the description for syntax errors?

619


What is dynamic dispatch in c++?

563


What is huge pointer in c?

589


What is strcpy() function?

661