please give code for this 1 2 4 7 11 16
Answer Posted / ashish tiwari
#include<stdio.h>
#include<conio.h>
void main()
{
int p=1,i;
for(i=1;i<=6;i++)
{
printf("%d ",p);
p+=i;
}
getch();
}
Is This Answer Correct ? | 4 Yes | 8 No |
Post New Answer View All Answers
What is linear search?
Define recursion in c.
Can a local variable be volatile in c?
What are enumerated types?
swap 2 numbers without using third variable?
What is stack in c?
What is build process in c?
Explain high-order bytes.
Why c is called top down?
Why main is not a keyword in c?
What is 1f in c?
What is unary operator?
What is void main () in c?
When should a type cast not be used?
stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.