Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


int i;
i=2;
i++;
if(i=4)
{
printf(i=4);
}
else
{
printf(i=3);
}
output of the program ?

Answers were Sorted based on User's Feedback



int i; i=2; i++; if(i=4) { printf(i=4); } else { ..

Answer / sukant

The syntax for the if statement is also not correct..
The conditional assignment includes two == rather than a single =...
so,, the if statement wont consider that as a conditional statement and come out of it..
And, it will give an error in the printf(i=3); as the syntax is not apt.

Is This Answer Correct ?    0 Yes 0 No

int i; i=2; i++; if(i=4) { printf(i=4); } else { ..

Answer / khaja

output is 3

Is This Answer Correct ?    1 Yes 2 No

int i; i=2; i++; if(i=4) { printf(i=4); } else { ..

Answer / fwfwgq

It will give segmentation fault in linux

Is This Answer Correct ?    6 Yes 8 No

int i; i=2; i++; if(i=4) { printf(i=4); } else { ..

Answer / gowtham

answer is three

Is This Answer Correct ?    1 Yes 6 No

int i; i=2; i++; if(i=4) { printf(i=4); } else { ..

Answer / fazlur

the output will b 4.

Is This Answer Correct ?    6 Yes 18 No

Post New Answer

More C Interview Questions

hi how to convert program from notepad to turboc editor can u please help me

3 Answers  


cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration

0 Answers  


Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?

0 Answers  


how to make program without <> in libray.

0 Answers  


In a switch statement, explain what will happen if a break statement is omitted?

0 Answers  


what is difference between procedural language and functional language ?

4 Answers   Wipro,


what is the difference between #include<stdio.h> and #include"stdio.h" ?

6 Answers   TCS,


Write a program that takes a 5 digit number and calculates 2 power that number and prints it

5 Answers   ABS, Accenture, HCL, Infosys, Infotech, SoftSolve, Software India, TCS, Vertex, Vimukti Technologies,


Is c easy to learn?

0 Answers  


write a program for fibonaci series by using while loop in c?

2 Answers  


Write a C program that defines a 2-dimentional integer array called A [50][50]. Then the elements of this array should randomly be initialized either to 1 or 0. The program should then print out all the elements in the diagonal (i.e. a[0][0], a[1][1],a[2][2], a[3][3], ……..a[49][49]). Finally, print out how many zeros and ones in the diagonal.

3 Answers   Infosys,


#include<stdio.h> #include<conio.h> void main() { int m=0111,n=20; printf("%d%d\n",m,n); getch(); }

1 Answers  


Categories