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

How can you read a directory in a C program?

872


Create a registration form application by taking the details like username, address, phone number, email with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 3 users and display the details. While taking input password must appear as “****”.

2922


What is a program?

908


How can I implement sets or arrays of bits?

800


Should a function contain a return statement if it does not return a value?

808


What are the string functions? List some string functions available in c.

797


Is main is a keyword in c?

833


What is a macro?

861


What is use of integral promotions in c?

867


What is the description for syntax errors?

830


Explain #pragma statements.

798


What are header files in c?

807


What are data structures in c and how to use them?

894


write a program to find out prime number using sieve case?

1845


How are variables declared in c?

829