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

HOW TO HANDLE EXCEPTIONS IN C

8 Answers  


What is scope rule of function in c?

0 Answers  


Is there a way to switch on strings?

0 Answers  


Explain what are linked list?

0 Answers  


what is disadvantage of pointer in C

13 Answers   Tech Mahindra,


Why header file is used in c?

0 Answers  


What is return type in c?

0 Answers  


What are types of functions?

0 Answers  


what is the different bitween abap and abap-hr?

0 Answers   TCS,


hi , please send me NIC written test papers to sbabavalli@gmail.com

0 Answers   NIC,


Write a program to swap two numbers without using a temporary variable?

0 Answers   Infosys,


can we write a program in c for printf and scanf without using header file stdio.h

1 Answers  


Categories