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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the difference between class and unio?

1866


Explain logical errors? Compare with syntax errors.

633


How can I recover the file name given an open stream or file descriptor?

600


Is exit(status) truly equivalent to returning the same status from main?

589


What is the scope of an external variable in c?

571






How to find a missed value, if you want to store 100 values in a 99 sized array?

821


What are the advantages of using linked list for tree construction?

647


Is c easy to learn?

563


What is null character in c?

695


Why void is used in c?

569


What are local variables c?

556


There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?

827


What are the difference between a free-standing and a hosted environment?

747


When I tried to go into a security sites I am denied access and a message appeared saying 'applet not initialize'. How can I rectify this problem.

1534


What does the error message "DGROUP exceeds 64K" mean?

729