C Programming MCQ

1:

Consider the following program.
main() 
{
char x[10], *ptr = x;
scanf("%s", x);
change(&x[4]);

change ( char a[ ] )
{
puts(a);

}
If abcdefg is the input, the output will be

A.

abcd

B.

abc

C.

efg

D.

garbage

 

Answer : C

Explanation :

Write your comments here:


Report Error
 

Option: A

Explanation : Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here.