#include"stdio.h"
#include"conio.h"
void main()
{
int a;
printf("\n enter a number:");
scanf("%c\n");
getch();
}

Answers were Sorted based on User's Feedback



#include"stdio.h" #include"conio.h" void main() { int a; printf("\n en..

Answer / janava

In this a variable is a integer but read the int as char so
it shows error.
this can be written as
#include<stdio.h>
#include<conio.h>
void main()
{
int a;
printf("\n Enter a number");
scanf("%d",&a);
getch();
}

Is This Answer Correct ?    48 Yes 13 No

#include"stdio.h" #include"conio.h" void main() { int a; printf("\n en..

Answer / lalithpriya

#include<stdio.h>
#include<conio.h>
void main()
{
int a;
clrscr();
printf("Enter a number:");
scanf("%d",&a);
printf("The entered number is %d",a);
getch();
}

Is This Answer Correct ?    13 Yes 5 No

#include"stdio.h" #include"conio.h" void main() { int a; printf("\n en..

Answer / r.kumar bsc

getting a value is defined %d that is scanf("%d\n");
this formatted is correct that %c is defined only is
getting the characters.

Is This Answer Correct ?    20 Yes 14 No

#include"stdio.h" #include"conio.h" void main() { int a; printf("\n en..

Answer / aarti

#include<stdio.h>
#include<conio.h>
void main
{
clrscr();
int number;
printf("\n enter a number:");
scanf("%d",&number);
getch();
}

Is This Answer Correct ?    9 Yes 7 No

#include"stdio.h" #include"conio.h" void main() { int a; printf("\n en..

Answer / pawanjha12

Here in the scanf("%c\n");
it is just take a input. and, it will store that input
value anywhere.
it would be just garbage value. ok.........
nothing is output.
say, null pointer assignment.........


Is This Answer Correct ?    3 Yes 3 No

#include"stdio.h" #include"conio.h" void main() { int a; printf("\n en..

Answer / gaurav tyagi

there is a error in program because ""is use in headerfile
due to this compiler is search the conio.h&stdio.h file in current directory
note:<>is use to tell compiler find these file in system area

Is This Answer Correct ?    2 Yes 2 No

#include"stdio.h" #include"conio.h" void main() { int a; printf("\n en..

Answer / aarti

#include<stdio.h>
#include<conio.h>
void main()
{
int number;
clrscr();
printf("\n enter a number:");
scanf("%d",&number);
getch();
}

Is This Answer Correct ?    4 Yes 4 No

#include"stdio.h" #include"conio.h" void main() { int a; printf("\n en..

Answer / mohit

#include {studio h}
#include{conio h}
[void main]

Is This Answer Correct ?    0 Yes 0 No

#include"stdio.h" #include"conio.h" void main() { int a; printf("\n en..

Answer / sansiri

it access the value but it doesnot assign for any variable

Is This Answer Correct ?    1 Yes 2 No

#include"stdio.h" #include"conio.h" void main() { int a; printf("\n en..

Answer / lodu

#INCLUDE<STDIO.H>
#INCLUDE<CONIO.H>
{
VOID MAIN()
{
INT X,Y,Z;

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More C C++ Errors Interview Questions

loop1: { x=i<n?(i++):0; printf("%d",i); exit(x); continue; } Error- misplaced continue. Doubt-1.will the exit(x) be executed for all values of x 2.will this statement go out of the program.

5 Answers   CMC,


What is the out put of this programme? int a,b,c,d; printf("Enter Number!\n"); scanf("%d",&a); while(a=!0) { printf("Enter numbers/n"); scanf("%d%d%d",&b,&c,&d); a=a*b*c*d; } printf("thanks!"); getche(); Entering numbers are a=1,b=2,c=3,d=4 b=3,c=4,d=-5 b=3,c=4,d=0

5 Answers   TCS,


void main() { int i=7; printf("N= %*d",i,i); }

6 Answers   HCL,


To generate the series 1+3+5+7+... using C program

18 Answers  


main() { char c; for(c='A';c<='Z';c++) getch(); }

9 Answers  






Answering Yes or No in C++...using only stdio.h and conio.h..........help me please...? here's must be the output of the program: Screen A Exam No. items Score 1 20 20 2 35 35 Another Entry? [Y] or [N] : Screen B: Record No. Student's Name: 1 Fernando Torres 2 Chuck Norris Note: if you press Y, the program must repeat the procedure in screen A, then if N, the program must proceed to the screen B....Please Help me out............

1 Answers  


Using string functions write a program that will accept the name of the capital as input value and will display the corresponding country. ------------------------ Capitals Countries ------------------------ Capitals Countries Ottawa Canada Moscow Russia Rome Italy I can't not get it to run properly

1 Answers   AMA,


WHAT WILL BE THE OUTPUT OF THE FOLLOWING QUESTION void main() { int x=4,y=3,z; z=x-- -y; printf("%d%d%d",x,y,z); }

25 Answers   HCL,


what is the large sustained error signal that eventually cause the controller output to drive to its limit

1 Answers   TCS,


I'm having trouble with coming up with the correct code. Thank You!! The assignment was to write a program using string functions that accepts a price of an item and displays its coded value. The base of the keys: X C O M P U T E R S 0 1 2 3 4 5 6 7 8 9 Sample I/O Dialogue: Enter Price: 489.50 Coded Value: PRS.UX

0 Answers  


write the value of x and y after execution of the statements: int x=19,y; y=x++ + ++x; x++; y++;

0 Answers  


char* f() return "hello:"; void main() {char *str=f(); }

1 Answers  


Categories