#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
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 |
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 |
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 |
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 |
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 |
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 |
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 |
Answer / mohit
#include {studio h}
#include{conio h}
[void main]
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / sansiri
it access the value but it doesnot assign for any variable
Is This Answer Correct ? | 1 Yes | 2 No |
Answer / lodu
#INCLUDE<STDIO.H>
#INCLUDE<CONIO.H>
{
VOID MAIN()
{
INT X,Y,Z;
Is This Answer Correct ? | 0 Yes | 1 No |
how to convert decimal to hexadecimal without using arrays just loops
quoroum of computer languages?
void main() { int i=5; printf("%d",i+++++i); }
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.....
Given that two int variables, total and amount , have been declared, write a sequence of statements that: initializes total to 0 reads three values into amount , one at a time. After each value is read in to amount , it is added to the value in total (that is, total is incremented by the value in amount ). Instructor's notes: If you use a loop, it must be a for loop. And if you use a loop control variable for counting, you must declare it.
A sample program using data structure? what is file handling?
How to reverse a linked list without using array & -1? Thank you.
Declaration of Cube Guys please help me.. Is this a right way to declare cube.? If i Compile it. It Says: Cube undeclared what should i do? Please help \thanks in advanced #include<stdio.h> #include<math.h> #include<conio.h> main( ) { float x,y; while(x++<10.0) { printf("Enter Number:"); scanf("%d", &x); y = cube(x); printf("%f %f %f \n", x,pow(x,2),y); cube(x); } { float x; float y; y = x*x*x; } getch(); return (y); }
Write a c-programe that input one number of four digits and find digits sum?
Assume that the int variables i and j have been declared, and that n has been declared and initialized. Write code that causes a "triangle" of asterisks of size n to be output to the screen. Specifically, n lines should be printed out, the first consisting of a single asterisk, the second consisting of two asterisks, the third consistings of three, etc. The last line should consist of n asterisks. Thus, for example, if n has value 3, the output of your code should be * ** *** You should not output any space characters. Hint: Use a for loop nested inside another for loop.
what is exceptions?
when i use cout or cin call & then either << or >> .....it shows declaration syntax error...what should i do? cout<<"anything"; int a; cin>>a; return 0;