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
Explain how does flowchart help in writing a program?
How do I copy files?
Why c is called procedure oriented language?
What are the advantages of using macro in c language?
What is wild pointer in c with example?
What do you mean by Recursion Function?
Define recursion in c.
What is the argument of a function in c?
List the difference between a 'copy constructor' and a 'assignment operator' in C?
What is bin sh c?
How can I sort a linked list?
How is actual parameter different from the formal parameter?
.find the output of the following program? char*myfunc(char*ptr) { ptr +=3; return (ptr); } int main() { char*x,*y; x="HELLO"; y=myfunc(x); printf("y = %s ",y); return 0; }
a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above
the number of measuring units from a arbitrary starting point in a record area or control block to some other point a) branching b) recording pointer c) none d) offset