Heyyy All,

Just a challenge .
A C program with if Else


if(){
/// insert sumthing
print ("in if")
// insert sumting
}

else {
///// insert sumthing
print ("in else");
//// insert sumthing
}

can anyone modify it so that program prints.
if and else both

Answers were Sorted based on User's Feedback



Heyyy All, Just a challenge . A C program with if Else if(){ /// insert sumthing print (..

Answer / ravinderrawat1989

Try...
sumthing tricky waiting after this

Is This Answer Correct ?    2 Yes 0 No

Heyyy All, Just a challenge . A C program with if Else if(){ /// insert sumthing print (..

Answer / naveen

Program:

void main()
{
int check =1;
if(check==1)
{
printf(" If Block\n");
goto condition1;
}
else
{
condition1:
printf("Else Block");
}
}

Output:

If Block
Else Block

Is This Answer Correct ?    3 Yes 1 No

Heyyy All, Just a challenge . A C program with if Else if(){ /// insert sumthing print (..

Answer / asmita negi

OMG.......
Hi Ravinder this looks quite tricky to me.
i am in 3rd yr btech IT.

Pls provide wroking soln for this.

Also can u please please please mail more such trap trick questions to me @

asmita_1991@gmail.com

it would be quite a help.
preparing for exam interview.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

Why ordinary variable store only one value  

0 Answers  


What is wrong with this program statement? void = 10;

0 Answers  


What is the result main() { char c=-64; int i=-32 unsigned int u =-16; if(c>i){ printf("pass1,"); if(c<u) printf("pass2"); else printf("Fail2");} else printf("Fail1); if(i<u) printf("pass2"); else printf("Fail2") } a)Pass1,Pass2 b)Pass1,Fail2 c)Fail1,Pass2 d)Fail1,Fail2 e)none

9 Answers   IBM,


Write a c program to build a heap method using Pointer to function and pointer to structure ?

0 Answers   Wipro,


What is main void in c?

1 Answers  






Differentiate between full, complete & perfect binary trees.

0 Answers  


main() { int x=20,y=35; x = y++ + x++; y = ++y + ++x; printf("%d %d\n",x,y); } what is the output?

10 Answers   Ramco,


I need a sort of an approximate strcmp routine?

0 Answers  


When I set a float variable to, say, 3.1, why is printf printing it as 3.0999999?

0 Answers  


When should I declare a function?

0 Answers  


1)which of following operator can't be overloaded. a)== b)++ c)?! d)<=

16 Answers   CybOrg, Siemens,


what is pointer ?

10 Answers   Kernex Micro Systems,


Categories