int i;
i=2;
i++;
if(i=4)
{
printf(i=4);
}
else
{
printf(i=3);
}
output of the program ?
Answer Posted / stuti
This program will give error. Becoz the format of if
statement and printf statement- both are wrong.
In if, instead of if(i==4), if(i=4) is written and in
printf statement, there should be printf("i==4"); and printf
("i=3");
So it will not be compiled.
| Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
What is the difference between new and malloc functions?
explain what is a newline escape sequence?
What is wrong with this program statement? void = 10;
What is a static variable in c?
general for is %wd,f-d; in this system "w" means a) 'w' represent total width of digits b) 'w' represent width which includes the digits before,after decimal place and the decimal point c) 'w' represent width which includes the digits before only d) 'w' represent width after decimal place only
Are there namespaces in c?
What is array of structure in c?
Why is sprintf unsafe?
Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.
Which is better pointer or array?
Compare interpreters and compilers.
Why doesnt that code work?
What are type modifiers in c?
why do some people write if(0 == x) instead of if(x == 0)?
Why does the call char scanf work?