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
You are to write your own versions of strcpy() and strlen (). Call them mystrcpy() and mystrlen(). Write them first as code within main(), not as functions, then, convert them to functions. You will pass two arrays to the function in the case of mystrcpy(), the source and target array.
4. main() { int c=- -2; printf("c=%d",c); }
Explain the meaning of keyword 'extern' in a function declaration.
What is scanf () in c?
What is equivalent to ++i+++j?
How do you use a pointer to a function?
how should functions be apportioned among source files?
write a program to create a sparse matrix using dynamic memory allocation.
Is there a built-in function in C that can be used for sorting data?
How is a pointer variable declared?
What is conio h in c?
What are categories used for in c?
Tell me what is null pointer in c?
What is LINKED LIST? How can you access the last element in a linked list?
What is omp_num_threads?