You are not logged in.

#1 2015-09-16 05:01:04

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

C Language Arrays And Strings Execution:

C Programming Quizzes C Language Arrays And Strings

Directions:
What will be printed after execution of the following code?

Question:
void main()
{
      int arr[10] = {1,2,3,4,5};
      printf("%d", arr[5]);
}

Option A):
0
Option B):
5
Option C):
Garbage Value
Option D):
6

Correct Answer is Option A):
0


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

2015-09-16 05:01:04

Advertisement
Ads By Google

Re: C Language Arrays And Strings Execution:



Board footer