1. What will be the output of the following programs.
a) #include <stdio.h>
Main()
{
Int x=4;
While(x==1)
{
X=x-1;
Printf(“%d”,x);
--x;
}
}




Answers were Sorted based on User's Feedback



1. What will be the output of the following programs. a) #include <stdio.h> Main() { Int x..

Answer / mani

it has some error............

Is This Answer Correct ?    6 Yes 0 No

1. What will be the output of the following programs. a) #include <stdio.h> Main() { Int x..

Answer / rohit

variable X have not been defined. so it has an error...........

Is This Answer Correct ?    3 Yes 0 No

1. What will be the output of the following programs. a) #include <stdio.h> Main() { Int x..

Answer / raja

In the following code snippet
#include <stdio.h>
Main()
{
Int x=4;
While(x==1)
{
X=x-1;
Printf(“%d”,x);
--x;
}
}
everything is fine except the typing mistake. C is a case sensitive language. So if u give Main instead of main u will get a compiler error. So Main, Int, While, Printf should be use as a main, int, while, printf and the X in line 7 should be x.
The correct program is
#include <stdio.h>
main()
{
int x=4;
while(x==1)
{
x=x-1;
printf("%d",x);
--x;
}
}
Nothing will get printed because x != 1

Is This Answer Correct ?    2 Yes 0 No




1. What will be the output of the following programs. a) #include <stdio.h> Main() { Int x..

Answer / bhavani

i think x initialization wrong.so it has an error...........

Is This Answer Correct ?    0 Yes 0 No

1. What will be the output of the following programs. a) #include <stdio.h> Main() { Int x..

Answer / satya

Ya.. it is correct...
you initialized the x as Int..
we have to to initialize it as int...

Is This Answer Correct ?    0 Yes 0 No

1. What will be the output of the following programs. a) #include <stdio.h> Main() { Int x..

Answer / palani222samy

empty

Is This Answer Correct ?    0 Yes 0 No

1. What will be the output of the following programs. a) #include <stdio.h> Main() { Int x..

Answer / mallesh

output is nothing bcz loop is not exists

Is This Answer Correct ?    0 Yes 0 No

Post New Answer



More C Interview Questions

What is difference between structure and union in c programming?

0 Answers  


What is memmove?

1 Answers   Oracle,


what is the code to display color fonts in the output?

1 Answers  


How can I run c program?

0 Answers  


Explain the array representation of a binary tree in C.

0 Answers   Genpact,






#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }

0 Answers   Wilco,


What does %2f mean in c?

0 Answers  


What is structure padding ?

3 Answers   HP,


write a c program to find the sum of five entered numbers using an array named number

0 Answers   TATA,


how to copy a string without using c function

5 Answers  


Are comments included during the compilation stage and placed in the EXE file as well?

0 Answers  


Is the below things valid & where it will be stored in memory layout ? static const volatile int i; register struct { } ; static register;

2 Answers   Lucent,






Categories