what is the error in the following code:
main()
{
int i=400,j;
j=(i*i)/i;
}
Answers were Sorted based on User's Feedback
Answer / erohitverma
it is not having return statement
main()
{
int i=400,j;
j=(i*i)/i;
return 0;
}
Is This Answer Correct ? | 5 Yes | 2 No |
Answer / srinivas
main fun dont have void so it should return int vale and j=
(i*i)/i here frist it will multiply so 400*400 it is out of
int range so it will take garbage value but it wont show
error for this reason but it will give one garbage value .
bcz we didnt write the return stmt so it will show error....
Is This Answer Correct ? | 3 Yes | 1 No |
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
which typw of errors ? & how to solve it ?
difference between c/c++ programing language? what is necessesity of c++ when existing c programing language?
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); }
How to develop a program using C language to convert 8-bit binary values to decimals. TQ
what is run time error?
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
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.
what is meant for variable not found?
How to create a program that lists the capital country when told what the original country is? (Terribly sorry, I'm a novice programmer and would appreciate any help ;). Cheers, Alexxis
What is the code for following o/p * * * * * * * * * * * * * * * *
#include<>stdio.h> #include<>conio.h> { printf("hello"); void main() getch(); } what the out put of this program and why ......plz clear my answer