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
What are the two forms of #include directive?
What is the difference between specifying a constant variable like with constant keyword and #define it? i.e what is the difference between CONSTANT FLOAT A=1.25 and #define A 1.25
Is c dynamically typed?
Explain main function in c?
Explain high-order bytes.
How can I send mail from within a c program?
Write a program to print factorial of given number without using recursion?
What is hungarian notation? Is it worthwhile?
a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above
Tell me about low level programming languages.
What is ponter?
Write a program to identify if a given binary tree is balanced or not.
Why c is called top down?
When should we use pointers in a c program?
Describe how arrays can be passed to a user defined function