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
Answer / ravinderrawat1989
Try...
sumthing tricky waiting after this
| Is This Answer Correct ? | 2 Yes | 0 No |
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 |
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 |
Program to find the sum of digits of a given number until the sum becomes a single digit
Why c is a mother language?
how to create c progarm without void main()?
write a program without using main function?
a=0; while(a<5) printf("%d\n",a++); how many times does the loop occurs? a.infinite b.5 c.4 d.6
Write a function that accepts a sentence as a parameter, and returns the same with each of its words reversed. The returned sentence should have 1 blank space between each pair of words. Demonstrate the usage of this function from a main program. Example: Parameter: “jack and jill went up a hill” Return Value: “kcaj dna llij tnew pu a llih”
What is pass by reference in functions?
Program to display given 3 integers in ascending order
Are pointers really faster than arrays?
Are there any problems with performing mathematical operations on different variable types?
how to find the size of the data type like int,float without using the sizeof operator?
what is the structure?