main()
{
int a=0;
if(a=0) printf("Ramco Systems\n");
printf("India\n");
}
output?
Answers were Sorted based on User's Feedback
Answer / fazlur rahaman naik
actually the output will b : India only.
the above programme doesn't produce any error at if(a =
0).because we r assiging value here, we r not comparing the
value here.so the condition will fail here and the next
statement after if condition will print.
| Is This Answer Correct ? | 10 Yes | 0 No |
Answer / 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 |
Answer / ripal
The output will produce error because there is error at if
(a=0).It should be if(a==0)
| Is This Answer Correct ? | 8 Yes | 7 No |
Explain Function Pointer?
True or false: If you continuously increment a variable, it will become negative? 1) True 2) False 3) It depends on the variable type
What is pass by value in c?
1) int main() { unsigned char a = 0; do { printf("%d=%c\n",a,a); a++; }while(a!=0); return 0; } can anyone please explain the explain the output
Want to know how to write a C program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.
what is the use of ‘auto’ keyword?
Write a program to print the prime numbers from 1 to 100?
What are volatile variables?
int *p=20; if u print like dis printf("%d",p); o\p:- 20; how is it possible? plz give me the explanation.
c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above
Explain what could possibly be the problem if a valid function name such as tolower() is being reported by the c compiler as undefined?
Can you please compare array with pointer?