int i;
i=2;
i++;
if(i=4)
{
printf(i=4);
}
else
{
printf(i=3);
}
output of the program ?
Answers were Sorted based on User's Feedback
Answer / sukant
The syntax for the if statement is also not correct..
The conditional assignment includes two == rather than a single =...
so,, the if statement wont consider that as a conditional statement and come out of it..
And, it will give an error in the printf(i=3); as the syntax is not apt.
| Is This Answer Correct ? | 0 Yes | 0 No |
hi how to convert program from notepad to turboc editor can u please help me
cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration
Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?
how to make program without <> in libray.
In a switch statement, explain what will happen if a break statement is omitted?
what is difference between procedural language and functional language ?
what is the difference between #include<stdio.h> and #include"stdio.h" ?
Write a program that takes a 5 digit number and calculates 2 power that number and prints it
5 Answers ABS, Accenture, HCL, Infosys, Infotech, SoftSolve, Software India, TCS, Vertex, Vimukti Technologies,
Is c easy to learn?
write a program for fibonaci series by using while loop in c?
Write a C program that defines a 2-dimentional integer array called A [50][50]. Then the elements of this array should randomly be initialized either to 1 or 0. The program should then print out all the elements in the diagonal (i.e. a[0][0], a[1][1],a[2][2], a[3][3], ……..a[49][49]). Finally, print out how many zeros and ones in the diagonal.
#include<stdio.h> #include<conio.h> void main() { int m=0111,n=20; printf("%d%d\n",m,n); getch(); }