You are not logged in.

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

hasnain
Administrator
From: Chichawatni
Registered: 2014-10-13
Posts: 8,355
Website

C Language Arrays And Strings Quiz;

http://interviewquestionsanswers.org/quiz/C-Programming http://interviewquestionsanswers.org/qu … nd-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


Failure is the first step towards seccess.

2015-09-16 04:54:36

Advertisement
Ads By Google

Re: C Language Arrays And Strings Quiz;



Board footer