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 |
main() { intj; while9j<=10) { printf("\n%d",j); j=j+1; } }
2)#include<iostream.h> main() { printf("Hello World"); } the program prints Hello World without changing main() the o/p should be intialisation Hello World Desruct the changes should be a)iostream operator<<(iostream os, char*s) os<<'intialisation'<<(Hello World)<<Destruct b) c) d)none of the above
Write a program that takes a 5 digit number and calculates 2 power that number and prints it.
What is the purpose of sprintf?
code for inverse a matrix
proc() { static i=10; printf("%d",i); } If this proc() is called second time, what is the output?
Can a pointer be null?
What is the difference between variable declaration and variable definition in c?
What is c preprocessor mean?
What is void pointers in c?
What is the basic structure of c?
write a program to create a sparse matrix using dynamic memory allocation.