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

. Consider the following program main() { int a[5]={1,3,6,7,0}; int *b; b=&a[2]; } The value of b[-1] is (A) 1 (B) 3 (C) -6 (D) none

9 Answers   Oracle,


Explain logical errors? Compare with syntax errors.

0 Answers  


Program to find the absolute value of given integer using Conditional Operators

6 Answers   N Tech,


What is the difference between getch() and getche()?

1 Answers   NSPL,


write a program to check whether a number is Peterson or not.

3 Answers  






What is the diffences between Windows XP and Windows Visa

1 Answers   Aricent, FHF,


What does emoji p mean?

0 Answers  


what is the output of the below code? main( ) { printf ( "\nOnly stupids use C?" ) ; display( ) ; } display( ) { printf ( "\nFools too use C!" ) ; main( ) ; }

3 Answers  


write a addition of two no. program with out using printf,scanf,puts .

4 Answers  


Is there a way to jump out of a function or functions?

0 Answers  


1.write a program to merge the arrays 2.write efficient code for extracting unique elements from a sorted list of array?

3 Answers   Qualcomm,


What are 'near' and 'far' pointers?

0 Answers  


Categories