You are not logged in.

#1 2015-09-12 06:57:32

husnain
User RankUser RankUser RankUser RankUser RankUser Rank
Administrator
From: Chichawatni,Pakistan
Registered: 2014-10-03
Posts: 8,129
Website

Sample Code:

C Programming Quizzes C Language Pointer

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

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

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

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

Correct Answer is Option C):
y=MVEDA


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

2015-09-12 06:57:32

Advertisement
Ads By Google

Re: Sample Code:



\n

Board footer