#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 |
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"
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.
How to convert hexadecimal to binary using c language..
1 Answers Bajaj, GAIL, Satyam, Zenqa,
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); }
Given an int variable n that has been initialized to a positive value and, in addition, int variables k and total that have already been declared, use a do...while loop to compute the sum of the cubes of the first n whole numbers, and store this value in total . Thus if n equals 4, your code should put 1*1*1 + 2*2*2 + 3*3*3 + 4*4*4 into total . Use no variables other than n , k , and total .
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;
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 ?
How to develop a program using C language to convert 8-bit binary values to decimals. TQ
what is run time error?
I'm having trouble with coming up with the correct code. Do I need to put a loop? Please let me know if I'm on the right track and what areas I need to correct. I still don't have a good grasp on this programming stuff. Thanks =) The assignment was to write a program using string functions that accepts a coded value of an item and displays its equivalent tag price. The base of the keys: 0 1 2 3 4 5 6 7 8 9 X C O M P U T E R S Sample I/O Dialogue: Enter coded value: TR.XX Tag Price : 68.00
class test { int a; public: test(int b):a(b){} void show(){ cout<<a; } }; void main() { test t1; test t2(5); t1.show(); t2.show(); } }
Write a program to accept two strings of Odd lengths. Then take all odd characters from one string and even characters from the other and concatenate and produce a string.