You are not logged in.

#1 2015-09-14 06:19:35

hasnain
Administrator
From: Chichawatni
Registered: 2014-10-13
Posts: 8,355
Website

C Language Function Quiz Question.

C Programming Quizzes C Language Function

Directions:
char* myfunc(char *ptr)
{
   ptr+=3;
   return(ptr);
}

void main()
{
   char *x, *y;
   x = "EXAMVEDA";
   y = myfunc(x);
   printf("y=%s", y);
}

Question:
What will be printed when the sample code above is executed?

Option A):
y=VEDA
Option B):
y=MVEDA
Option C):
y=EXAMVEDA
Option D):
y=EDA

Correct Answer is Option B):
y=MVEDA


Failure is the first step towards seccess.

2015-09-14 06:19:35

Advertisement
Ads By Google

Re: C Language Function Quiz Question.



\n

Board footer