Whats wrong with the following function
char *string()
{
char *text[20];
strcpy(text,"Hello world");
return text;
}
Answer Posted / qint
1. returning address of a local variable.
2. wrong parameter passed to strcpy()
| Is This Answer Correct ? | 4 Yes | 5 No |
Post New Answer View All Answers
How many data structures are there in c?
Write a Program to find whether the given number or string is palindrome.
How many identifiers are there in c?
while loop contains parts a) initialisation, evalution of an expression,increment /decrement b) initialisation, increment/decrement c) condition evalution d) none of the above
What are the difference between a free-standing and a hosted environment?
Why we use int main and void main?
What is %d used for?
What is strcmp in c?
List a few unconditional control statement in c.
What is static function in c?
What is structure padding and packing in c?
When do we get logical errors?
What is the use of function overloading in C?
Write a program to print all permutations of a given string.
Where is c used?