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
What is a spanning Tree?
What is the difference between constant pointer and constant variable?
Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;
Give the rules for variable declaration?
How pointer is different from array?
How do I copy files?
What does sizeof int return?
How can I check whether a file exists? I want to warn the user if a requested input file is missing.
Can 'this' pointer by used in the constructor?
What does a function declared as pascal do differently?
What is a file descriptor in c?
Describe static function with its usage?
What is the equivalent code of the following statement in WHILE LOOP format?
What are global variables?
Write a program to swap two numbers without using third variable in c?