You are not logged in.

#1 2015-09-17 05:55:14

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

C Language Basic Quiz Question.

C Programming Quizzes C Language Basic

Directions:
Determine Output:

Question:
void main()
{
      int a[] = {10,20,30,40,50}, j, *p;
      for(j=0; j<5; j++){
            printf("%d" ,*a);
            a++;
      }
      p = a;
      for(j=0; j<5; j++){
            printf("%d" ,*p);
            p++;
      }
}

Option A):
10 20 30 40 50 10 20 30 40 50
Option B):
10 20 30 40 50 Garbage Value
Option C):
Error
Option D):
None

Correct Answer is Option C):
Error


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

2015-09-17 05:55:14

Advertisement
Ads By Google

Re: C Language Basic Quiz Question.



Board footer