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
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 |
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 |
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 |
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 |
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 |
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 |
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 |
what will the following program do? void main() { int i; char a[]="String"; char *p="New Sring"; char *Temp; Temp=a; a=malloc(strlen(p) + 1); strcpy(a,p); //Line no:9// p = malloc(strlen(Temp) + 1); strcpy(p,Temp); printf("(%s, %s)",a,p); free(p); free(a); } //Line no 15// a) Swap contents of p & a and print:(New string, string) b) Generate compilation error in line number 8 c) Generate compilation error in line number 5 d) Generate compilation error in line number 7 e) Generate compilation error in line number 1
void main(int n) { if(n==0) return; main(--n); printf("%d ",n); getch(); } how it work and what will be its output...............it any one know ans plz reply
for(i=1;i>0;i++); printf("i=%d",i); what will be the answer????
What is meant by 'bit masking'?
Why are all header files not declared in every c program?
Whats s or c mean?
Write a program to find minimum between three no.s whithout using comparison operator.
a linear linked list such that the link field of its last node points to the first node instead of containing NULL a) linked list b) circular linked list c) sequential linked list d) none
what is the output of the program and explain why?? #include<stdio.h> void main ( ) { int k=4,j=0: switch (k) { case 3; j=300; case 4: j=400: case 5: j=500; } printf (ā%d\nā,j); }
what is the flow of execution in cprogram? ex:printf();,scanf();
Explain how does free() know explain how much memory to release?
How many ways are there to swap two numbers without using temporary variable? Give the each logic.