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

5. What kind of sorting is this: SORT (k,n) 1.[Loop on I Index] repeat thru step2 for i=1,2,........n-1 2.[For each pass,get small value] min=i; repeat for j=i+1 to N do { if K[j]<k[min] min=j; } temp=K[i];K[i]=K[min];K[min]=temp; 3.[Sorted Values will be returned] A)Bubble Sort B)Quick Sort C)Selection Sort D)Merge Sort

2 Answers   Accenture,


What is the scope of global variable in c?

0 Answers  


How old is c programming language?

0 Answers  


WRITE A PROGRAM TO PRINT THE FOLLOWING OUTPUTS USING FOR LOOPS. A) * B) ***** *** * * ***** * * *****

2 Answers  


what is develop in c language

2 Answers  






What is function prototype in c with example?

0 Answers  


Write a program to display the no of bit difference between any 2 given numbers eg: Num1 will 12->1100 Num2 will 7->0111 the difference in bits are 2.

4 Answers  


C program code int zap(int n) { if(n<=1)then zap=1; else zap=zap(n-3)+zap(n-1); } then the call zap(6) gives the values of zap [a] 8 [b] 9 [c] 6 [d] 12 [e] 15

6 Answers   TCS, Wipro,


how to display 2-D array elements in spiral

2 Answers  


what is the value of b if a=5; b=++a + ++a

31 Answers   Infosys, TCS, Tech Mahindra,


What is hashing in c language?

0 Answers  


write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.

0 Answers   TCS,


Categories