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

What are the uses of a pointer?

675


GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)

678


Can we use visual studio for c?

544


How can I manipulate individual bits?

604


What does %p mean c?

623






Why malloc is faster than calloc?

586


how can f be used for both float and double arguments in printf? Are not they different types?

606


Write a C program linear.c that creates a sequence of processes with a given length. By sequence it is meant that each created process has exactly one child. Let's look at some example outputs for the program. Here the entire process sequence consists of process 18181: Sara@dell:~/OSSS$ ./linear 1 Creating process sequence of length 1. 18181 begins the sequence. An example for a sequence of length three: Sara@dell:~/OSSS$ ./linear 3 Creating process sequence of length 3. 18233 begins the sequence. 18234 is child of 18233 18235 is child of 18234 ........ this is coad .... BUt i could not compleate it .....:( #include #include #include #include int main(int argc, char *argv[]) { int N; pid_t pid; int cont; if (argc != 2) { printf("Wrong number of command-line parameters!\n"); return 1; } N = atoi(argv[1]); printf("Creating process sequence of length %d.\n",N); printf("%d begins the sequence.\n",getpid()); /* What I have to do next ?????? */ }

1613


What functions are used for dynamic memory allocation in c language?

597


What is wrong with this declaration?

608


What are header files in c programming?

651


What is a macro in c preprocessor?

624


How does placing some code lines between the comment symbol help in debugging the code?

543


Simplify the program segment if X = B then C ← true else C ← false

2579


can any one please explain, how can i access hard disk(physical address)? it is possible by the use of far,near or huge pointer? if yes then please explain......

1402