Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

write a “Hello World” program in “c” without using a semicolon?

9 Answers   CTS, TCS, Wipro,


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 ?

15 Answers   Mascot,


Find the largest number from the given 2 numbers without using any loops and the conditional operator.

2 Answers  


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?

0 Answers  


how to go with this?

1 Answers   Wipro,


how to generate sparse matrix in c

3 Answers  


what are the files which are automatically opened when a c file is executed?

3 Answers  


Write a c program to print the sizes and ranges of different data types in c?

1 Answers  


How can this be legal c?

0 Answers  


What is a volatile keyword in c?

0 Answers  


Write a program to find factorial of a number using recursive function.

0 Answers   Global Logic, TCS,


Categories