main()
{
int a=0;
if(a=0) printf("Ramco Systems\n");
printf("India\n");
}
output?
Answer Posted / vikesh
the answer will be India
if statement executes the statement if it is true i.e other
than "0"..[eg.if(1)]
here we are giving a=0 which implies false.
so the if statement doesnot execute first statement.
if you dont agree check following
main()
{
int a=0;
if(a=1)/*other than zero any number*/
printf("Ramco Systems\n")
printf("India\n");}
| Is This Answer Correct ? | 8 Yes | 1 No |
Post New Answer View All Answers
Why is extern used in c?
Tell me what is null pointer in c?
"C" language developed by "Dennis Ritchie" at AT & T. his remarks are a) too general, too abstract b) could deal with only specific problems c) lost generality of BCPL and B restored d) no remarks
C language questions for civil engineering
main() { printf("hello"); fork(); }
What is break statement?
Explain Function Pointer?
Tell us bitwise shift operators?
What is dynamic dispatch in c++?
Explain the ternary tree?
find out largest elemant of diagonalmatrix
Differentiate fundamental data types and derived data types in C.
Why & is used in scanf in c?
When should the register modifier be used? Does it really help?
What is structure pointer in c?