Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


print out put like this form
1 2 3 4 5 6
3 5 7 9 11
8 12 16 20

Answers were Sorted based on User's Feedback



print out put like this form 1 2 3 4 5 6 3 5 7 9 11 8 12 16 20..

Answer / sai

#include<stdio.h>
#include<conio.h>
void main()
{
int i;
clrscr();
for(i=1;i<=6;i++)
printf("%d ",i);
for(i=3;i<=11;i=i+2)
printf("%d ",i);
for(i=8;i<=20;i=i+4)
printf("%d ",i);
getch();
}

Is This Answer Correct ?    30 Yes 5 No

print out put like this form 1 2 3 4 5 6 3 5 7 9 11 8 12 16 20..

Answer / guest

1 2 3 4 5 6 7 8 9 11 12 16 20

Is This Answer Correct ?    7 Yes 7 No

print out put like this form 1 2 3 4 5 6 3 5 7 9 11 8 12 16 20..

Answer / sourav das

#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,k;
for(i=1;i<=6;i++)
printf("%d",i);
printf("\n");
for(j=3;j<=11;j=j+2)
printf("%d",j);
printf("\n");
for(k=8;i<=20;k=k+4)
printf("%d",k);
getch();
}

Is This Answer Correct ?    3 Yes 3 No

print out put like this form 1 2 3 4 5 6 3 5 7 9 11 8 12 16 20..

Answer / sanjay bhosale

int *a,n;
printf("\n Enter the number of elements");
scanf("%d",&n);
a = new int[n];
for(int i=0;i<n;i++)
{
a[i] = i+1;
}
printf("\n : Output : \n");
for(int i=0;i<n;i++)
{
printf("%d\t",a[i]);
}
for(int t = n-1;t>0;t--)
{
printf("\n");
for(int i=0;i<t;i++)
{
printf("%d\t",a[i]+a[i+1]);
a[i] = a[i]+a[i+1];
}
}

Is This Answer Correct ?    0 Yes 0 No

print out put like this form 1 2 3 4 5 6 3 5 7 9 11 8 12 16 20..

Answer / guest

main()
{
printf(%d,1 2 3 4 5 6 3 5 7 9 11 8 12 16 20)
}

Is This Answer Correct ?    0 Yes 0 No

print out put like this form 1 2 3 4 5 6 3 5 7 9 11 8 12 16 20..

Answer / guest

main()
{
printf(%d,1 2 3 4 5 6 3 5 7 9 11 8 12 16 20)
}

Is This Answer Correct ?    0 Yes 0 No

print out put like this form 1 2 3 4 5 6 3 5 7 9 11 8 12 16 20..

Answer / paru jain

#include<stdio.h>
void main()
{
for(i=1;i<=6;i++)
{
printf("%d",i);
}
printf("\n");
int value = 1;
for(int j=1;j<6;j++
{
value = value+2;
printf("%d",value);
}
printf("\n");
for(int k=2;k<6;k++)
{
int m = j*4;
printf("%d",m);
}
}

Is This Answer Correct ?    1 Yes 2 No

print out put like this form 1 2 3 4 5 6 3 5 7 9 11 8 12 16 20..

Answer / r@m$

#include<stdio.h>
void main(){
int x=0,y=0;
while(y<20){
for(x=0;x<6;x++){
y++;
printf("%d\t",y);
}
y-=5;
for(x=0;x<5;x++){
y+=2;
printf("%d\t",y);
}
y-=7;
for(x=0;x<4;x++){
y+=4;
printf("%d\t",y);
}
}
}

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More C Interview Questions

What does node * mean?

0 Answers  


Write a code of a general series where the next element is the sum of last k terms.

0 Answers   Aspiring Minds,


What will the code below print when it is executed?   int x = 3, y = 4;         if (x = 4)                 y = 5;         else                 y = 2;         printf ("x=%d, y=%d ",x,y);

0 Answers  


How do you define structure?

0 Answers  


What will be result of the following program? void myalloc(char *x, int n) { x= (char *)malloc(n*sizeof(char)); memset(x,\0,n*sizeof(char)); } main() { char *g="String"; myalloc(g,20); strcpy(g,"Oldstring"); printf("The string is %s",g); } a) The string is : String b) Run time error/Core dump c) The string is : Oldstring d) Syntax error during compilation e) None of these

3 Answers   IBM,


I need a sort of an approximate strcmp routine?

0 Answers  


How will you divide two numbers in a MACRO?

0 Answers   Apps Associates,


Can we initialize extern variable in c?

0 Answers  


What does %d do in c?

0 Answers  


Is it possible to use curly brackets ({}) to enclose single line code in c program?

0 Answers  


What the different types of arrays in c?

0 Answers  


What is the purpose of & in scanf?

0 Answers  


Categories