You are not logged in.

#1 2015-09-14 05:49:19

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

C Language Operators And Expressions Program Code:

C Programming Quizzes C Language Operators And Expressions

Directions:
Determine output of the following program code.

Question:
#include<stdio.h>
void main()
{
   int a, b=7;
   a = b<4 ? b<<1 : ++b>4 ? 7>>1 : a;
   printf("%d %d", a, b);
}

Option A):
3 8
Option B):
3 7
Option C):
8 3
Option D):
7 3

Correct Answer is Option A):
3 8


Failure is the first step towards seccess.

2015-09-14 05:49:19

Advertisement
Ads By Google

Re: C Language Operators And Expressions Program Code:



\n

Board footer