main() {
int x=2, y=4
if ((x==2||y==4)
x++
y++
if (y==4+1)
{
x=x+y;
}
y++;
printf("The values of x and y are %d and %d."x,y);
}
What is the output?
Answers were Sorted based on User's Feedback
Answer / rajesh
Error will be occur because the variable declaration
does`t intilized terminate symbol(;), and again same
mistake in line 5 and line 6.
| Is This Answer Correct ? | 7 Yes | 0 No |
Answer / ganesh bankar
There is a errsor at compile time because some statements
are not terminated by ";".
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / moolshankershukla
if use terminator after x++ and y++ and y=4 and ) missing
and {} missing then out put is
x=8 and y=6.
correct answer like this :
main ()
{
int x=2, y=4;
if ((x==2||y==4))
{
x++;
y++;
}
if (y==4+1)
{
x=x+y;
}
y++;
printf("The values of x and y are %d and %d."x,y);
}
out put is
x=8 and y=6.
| Is This Answer Correct ? | 5 Yes | 0 No |
What are directives in c?
What are different storage class specifiers in c?
There are 8 billiard balls, and one of them is slightly heavier, but the only way to tell was by putting it on a weighing scale against another. What's the fewest number of times you'd have to use the scale to find the heavier ball?
Evaluate the following: int fn(int v) { if(v==1 || v==0) return 1; if(v%2==0) return fn(v/2)+2; else return fn(v-1)+3; } for fn(7); 1) 10 2) 11 3) 1
what is a NULL Pointer? Whether it is same as an uninitialized pointer?
Why is c called "mother" language?
the maximum width of a c variable name can be a) 6 characters b) 8 characters c) 10 characters d) 20 characters
main() { charx; while (x=0;x<=255;x++) printf("\nAscii value %d Character %c,x,x); }
Result of the following program is main() { int i=0; for(i=0;i<20;i++) { switch(i) case 0:i+=5; case 1:i+=2; case 5:i+=5; default i+=4; break;} printf("%d,",i); } } a)0,5,9,13,17 b)5,9,13,17 c)12,17,22 d)16,21 e)syntax error
On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area
Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix
main() { int i,j,A; for(A=-1;A<=1;A++) prinf("%d\t",!!A); }