progrem to generate the following series
1
12
123
1234
12345
Answer Posted / mustafiz
#include<stdio.h>
int main()
{
int row,i;
printf("Enter row number:\n");
scanf("%d",&row);
int sum=0;
for(i=1;i<=row;i++)
{
sum = sum *10 +i;
printf("%d\n",sum);
}
return 0;
}
Is This Answer Correct ? | 25 Yes | 12 No |
Post New Answer View All Answers
Write a factorial program using C.
#include main() { enum _tag{ left=10, right, front=100, back}; printf("left is %d, right is %d, front is %d, back is %d",left,right,front,back); }
Explain argument and its types.
what is the format specifier for printing a pointer value?
What is #define size in c?
How many header files are in c?
What is void main ()?
Explain how can I right-justify a string?
where are auto variables stored? What are the characteristics of an auto variable?
Explain the difference between structs and unions in c?
Is Exception handling possible in c language?
Explain what are compound statements?
Why can't I perform arithmetic on a void* pointer?
When should you use a type cast?
What is #error and use of it?