You are not logged in.

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

husnain
User RankUser RankUser RankUser RankUser RankUser Rank
Administrator
From: Chichawatni,Pakistan
Registered: 2014-10-03
Posts: 8,129
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


You cannot discover the new oceans unless you have the courage to lose the sight of the shore.

2015-09-14 06:19:33

Advertisement
Ads By Google

Re: C Language Function Quiz Question.



Board footer