You are not logged in.

#1 2015-09-14 05:53:27

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

C Language Operators And Expressions Program Fragment:

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

Directions:
Consider the following program fragment, and choose the correct one:

Question:
void main()
{
   int a, b = 2, c;
   a = 2 * (b++);
   c = 2 * (++b);
}

Option A):
a = 4, c = 8
Option B):
b = 3, c = 6
Option C):
b = 4, c = 6
Option D):
a = 3, c = 8

Correct Answer is Option A):
a = 4, c = 8


Failure is the first step towards seccess.

2015-09-14 05:53:27

Advertisement
Ads By Google

Re: C Language Operators And Expressions Program Fragment:



Board footer