main()
{
int i,n=010;
int sum=0;
for(i=1;i<=n;i++)
{s=s+i;
}
printf("%d",&s);
getch();
}

Answer Posted / devendra kumar gupta

S is not define
there variable not declare error is occur

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a code to generate divisors of an integer?

821


How can I read a binary data file properly?

843


What is the difference between %d and %i?

822


A variable that is defined in a specified portion of a program but can be used throughout the program a) global variable b) local variable c) character d) none

963


What are lookup tables in c?

760


Explain what is wrong with this program statement? Void = 10;

993


What are the different types of data structures in c?

860


What is the use of clrscr?

797


Why enum is used in c?

709


1.int a=10; 2.int b=20; 3. //write here 4.b=30; Write code at line 3 so that when the value of b is changed variable a should automatically change with same value as b. 5.

1912


Create a simple code fragment that will swap the values of two variables num1 and num2.

1047


What is the basic structure of c?

786


What is the sizeof () operator?

794


What is the difference between printf and scanf )?

799


What is a void pointer? When is a void pointer used?

834