please give code for this 1 2 4 7 11 16

Answer Posted / santhoshreddy katam

#include<stdio.h>
#include<conio.h>
void main()
{
int a=1;
for(int i=0;i<=5;i++)
{
a=a+i;
printf("%d/n", a);
getch();
}
}

Is This Answer Correct ?    36 Yes 40 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Array is an lvalue or not?

620


Write a program to use switch statement.

649


What is signed and unsigned?

627


What are the differences between new and malloc in C?

595


What is the difference between malloc calloc and realloc in c?

634






Is using exit() the same as using return?

666


Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.

640


A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile

634


Define circular linked list.

558


How can you find the exact size of a data type in c?

587


What is integer constants?

606


Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?

587


Explain what is the difference between the expression '++a' and 'a++'?

618


An expression to whose value an operater is applied a) operand b) variable c) constant d) all of the above

641


Is c is a middle level language?

585