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
Why is this loop always executing once?
Why do we use null pointer?
hi send me sample aptitude papers of cts?
How do you define a function?
Can we declare variable anywhere in c?
Tell me what is the purpose of 'register' keyword in c language?
What is the difference between āgā and āgā in C?
What is the value of a[3] if integer a[] = {5,4,3,2,1}?
Write a program on swapping (100, 50)
Describe the steps to insert data into a singly linked list.
What does %d do in c?
What is the use of a static variable in c?
p*=(++q)++*--p when p=q=1 while(q<=6)
How does selection sort work in c?
Can we declare a function inside a function in c?