main()
{
int i,n=010;
int sum=0;
for(i=1;i<=n;i++)
{s=s+i;
}
printf("%d",&s);
getch();
}
Answers were Sorted based on User's Feedback
Answer / codingfreak
In the above question for
printf("%d",&s);
It prints the address location of variable s
printf("%d",s);
Prints the value 36.
| Is This Answer Correct ? | 5 Yes | 1 No |
Answer / rupesh d. patil
Error
undefined symbol 's' in function main()
Warning
'sum' is assigned a value that is never used in function main
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / devendra kumar gupta
S is not define
there variable not declare error is occur
| Is This Answer Correct ? | 0 Yes | 0 No |
write a “Hello World” program in “c” without using a semicolon?
C passes By value or By reference?
5 Answers Geometric Software, Infosys,
int i; i=2; i++; if(i=4) { printf(i=4); } else { printf(i=3); } output of the program ?
Find the largest number from the given 2 numbers without using any loops and the conditional operator.
Write a program to input the price of 1 burger and the number of burgers eaten by a group of friends .print the total amount to be paid by the group?
how to go with this?
how to generate sparse matrix in c
what are the files which are automatically opened when a c file is executed?
Write a c program to print the sizes and ranges of different data types in c?
How can this be legal c?
What is a volatile keyword in c?
Write a program to find factorial of a number using recursive function.