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



main() { int i,n=010; int sum=0; for(i=1;i<=n;i++) {s=s+i; } printf(&q..

Answer / anu

Error
since s is not declared

Is This Answer Correct ?    7 Yes 0 No

main() { int i,n=010; int sum=0; for(i=1;i<=n;i++) {s=s+i; } printf(&q..

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

main() { int i,n=010; int sum=0; for(i=1;i<=n;i++) {s=s+i; } printf(&q..

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

main() { int i,n=010; int sum=0; for(i=1;i<=n;i++) {s=s+i; } printf(&q..

Answer / devendra kumar gupta

S is not define
there variable not declare error is occur

Is This Answer Correct ?    0 Yes 0 No

main() { int i,n=010; int sum=0; for(i=1;i<=n;i++) {s=s+i; } printf(&q..

Answer / jack

-14

Is This Answer Correct ?    2 Yes 7 No

main() { int i,n=010; int sum=0; for(i=1;i<=n;i++) {s=s+i; } printf(&q..

Answer / sravan

s=10

Is This Answer Correct ?    3 Yes 9 No

Post New Answer

More C Interview Questions

What header files do I need in order to define the standard library functions I use?

0 Answers  


why ordinary variable store the later value not the initial

1 Answers  


explain memory layout of a C program

2 Answers  


Write a program to reverse a given number in c?

0 Answers  


what is the function of pragma directive in c?

0 Answers  


What are the types of type specifiers?

0 Answers  


how to use enum datatype?Please explain me?

3 Answers   Excel,


How to run c Program without using IDE of c. means if program made in notepad.then how to compile by command prompt.

1 Answers   HP, TCS,


input any 4 digit number and find the difference of all the digits?

3 Answers   Google,


Iam a B.Tech graduate and completed my engineering in 2009, from 2005 to 2009 and after that i had done nothing.Now i want to do job and get into BPO field . Friends give me suggestions as what to say in interview... if they ask me that what would you had done ... these many years without doing job ??????? pls urgent

0 Answers  


main() { int age; float ht; printf("Enter height and age"); scanf("%d%d",&height,&age); if((age<=20)&&(ht>=5)) {printf("She loves you");} else {printf("She loves you");} }

2 Answers  


What is your stream meaning?

0 Answers  


Categories