#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

I am using Qt 5.6 during compilation it stops and gives error about Qmake The process "C:QtQt5.6.35.6.3msvc2015_64inqmake.exe" crashed. Error while building/deploying project untitled1 (kit: Desktop Qt 5.6.3 MSVC2015 64bit) When executing step "qmake"

0 Answers  


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

1 Answers   TCS,


How to upgrade LOOP environment, I just mean, how can i make loop statement editable ? I just try some program using loop statement and checking it in multiple compilers. Every compiler showing different output, what's the wrong ? is it a compiler based problem, or loop based problem, tell me why ? and what will be the debugging process, for this kind of problem ?

1 Answers  


wap for bubble sort

3 Answers  


void main() { int i=5,y=3,z=2,ans; clrscr(); printf("%d",++i + --z + i++ + --i * ++y); i=5,y=3,z=2; ans=++i + --z + i++ + --i * ++y; printf("\n%d",ans); getch(); } Its output is 37 and 31.... Please explain me why its different How it works.....

2 Answers  






Given an int variable n that has already been declared and initialized to a positive value, and another int variable j that has already been declared, use a do...while loop to print a single line consisting of n asterisks. Thus if n contains 5, five asterisks will be printed. Use no variables other than n and j .

2 Answers  


write a profram for selection sort whats the error in it?

2 Answers  


what is the error in the following code: main() { int i=400,j; j=(i*i)/i; }

4 Answers  


how tally is useful?

2 Answers  


what is exceptions?

5 Answers   HCL, Wipro,


How to convert hexadecimal to binary using c language..

1 Answers   Bajaj, GAIL, Satyam, Zenqa,


UINT i,j; i = j = 0; i = ( i++ > ++j ) ? i++ : i--; explain pls....

5 Answers  


Categories