You are not logged in.

#1 2015-09-16 04:54:34

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 Quiz;

C Programming Quizzes C Language Arrays And Strings

Directions:
#include <stdio.h>
int main(void)
{
    char p;
    char buf[10] = {1, 2, 3, 4, 5, 6, 9, 8};
    p = (buf + 1)[5];
    printf("%d", p);
    return 0;
}

Question:
What will be the output of following program code?

Option A):
None
Option B):
9
Option C):
5
Option D):
6

Correct Answer is Option B):
9


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

2015-09-16 04:54:34

Advertisement
Ads By Google

Re: C Language Arrays And Strings Quiz;



Board footer