please give code for this 1 2 4 7 11 16
Answer Posted / mohan
#include<stdio.h>
void main(){
int i,j=1;
printf("%d\t",j);
for(i=1;i<6;i++){
j=j+i;
printf("%d\t",j);
}
}
| Is This Answer Correct ? | 6 Yes | 13 No |
Post New Answer View All Answers
What is the use of bit field?
Explain what is the difference between a string and an array?
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)
When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd
What's a good way to check for "close enough" floating-point equality?
Explain the difference between structs and unions in c?
How can a program be made to print the line number where an error occurs?
Are local variables initialized to zero by default in c?
What are the advantages of the functions?
What is the purpose of main( ) in c language?
Why structure is used in c?
Why is not a pointer null after calling free?
Explain the difference between #include "..." And #include <...> In c?
How can I read in an object file and jump to locations in it?
FORMATTED INPUT/OUTPUT functions are a) scanf() and printf() b) gets() and puts() c) getchar() and putchar() d) all the above