You are not logged in.

#1 2015-09-17 04:25:05

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

C Language Basic Quiz Question.

http://interviewquestionsanswers.org/quiz/C-Programming http://interviewquestionsanswers.org/qu … uage-Basic

Directions:
Determine Output:

Question:
void main()
{
      char *str1 = "abcd";
      char str2[] = "abcd";
      printf("%d %d %d", sizeof(str1), sizeof(str2), sizeof("abcd"));
}

Option A):
2 4 5
Option B):
2 5 5
Option C):
2 4 4
Option D):
5 5 5

Correct Answer is Option B):
2 5 5


Failure is the first step towards seccess.

2015-09-17 04:25:05

Advertisement
Ads By Google

Re: C Language Basic Quiz Question.



Board footer