write a program whose output will be-
1
12
123
1234
Answer Posted / chaitanya
#include<stdio.h>
void main()
{
int s,i,j,n=1;
printf("enter the length of the sequence
");
scanf("%d",&s);
for(i=1;i<=s;i++)
{
for(j=1;j<=i;j++)
{
printf("%d",j);
}
printf(" ");
}
}
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
What are multidimensional arrays?
What are the keywords in c?
Explain logical errors? Compare with syntax errors.
Explain what is the difference between functions getch() and getche()?
What is wild pointer in c with example?
What is the difference between variable declaration and variable definition in c?
What is pointer to pointer in c with example?
Explain what is the general form of a c program?
What is the difference between pure virtual function and virtual function?
FORMATTED INPUT/OUTPUT functions are a) scanf() and printf() b) gets() and puts() c) getchar() and putchar() d) all the above
differentiate built-in functions and user – defined functions.
Which programming language is best for getting job 2020?
Does * p ++ increment p or what it points to?
What are preprocessor directives in c?
What is the difference between a function and a method in c?