What will be the result of the following program?
char*g()
{
static char x[1024];
return x;
}
main()
{
char*g1="First String";
strcpy(g(),g1);
g1=g();
strcpy(g1,"Second String");
printf("Answer is:%s", g());
}
(A) Answer is: First String (B) Answer is: Second String
(C) Run time Error/Core Dump (D) None of these
Answer Posted / abhisheksingh462
Answer is "second string" because both handle same address
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
Differentiate between functions getch() and getche().
What does emoji p mean?
any C program contains only one function, it must be a) void () b) main () c) message () d) abc ()
Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.
Is c is a high level language?
Which are low level languages?
Explain what are multidimensional arrays?
how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software
What is a file descriptor in c?
What is volatile variable in c?
What is pointer to pointer in c with example?
Explain what is wrong in this statement?
What is a char in c?
a function gets called when the function name is followed by a a) semicolon (;) b) period(.) c) ! d) none of the above
Write a code of a general series where the next element is the sum of last k terms.