Write a program to produce the following output in c language?
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1

Answers were Sorted based on User's Feedback



Write a program to produce the following output in c language? 1 1 1 1 2 1 ..

Answer / kalaiarasan

#include<stdio.h>
#include<math.h>
main()
{
unsigned long int k=11;
for(i=0;i<5;i++)
printf("\n%u\n",pow(k,i));
}

Is This Answer Correct ?    1 Yes 4 No

Write a program to produce the following output in c language? 1 1 1 1 2 1 ..

Answer / rajesh

#include<iostream>
#include<conio.h>
int main()
{

cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"<<1<<endl;
cout<<"\t"<<"\t"<<"\t"<<1<<"\t"<<"\t"<<"\t"<<1<<endl;
cout<<"\t"<<"\t"<<1<<"\t"<<"\t"<<2<<"\t"<<"\t"<<"\t"<<1<<endl;
cout<<"\t"<<1<<"\t"<<"\t"<<3<<"\t"<<"\t"<<"\t"<<3<<"\t"<<"\t"<<"\t"<<1<<"\n";
cout<<1<<"\t"<<4<<"\t"<<"\t"<<"\t"<<6<<"\t"<<"\t"<<"\t"<<4<<"\t"<<"\t"<<"\t"<<1;
getch();

return 0;
}

Is This Answer Correct ?    1 Yes 8 No

Post New Answer

More C Interview Questions

What is data structure in c language?

0 Answers  


Write a program that his output * *** *****

1 Answers  


What is volatile variable in c?

0 Answers  


What has to put when we are inserting as assembly language code into the C code? or When we are inserting as assembly language code into the C code we have to insert one thing at the start and of the assembly language. What are they?

2 Answers  


What is a program flowchart and how does it help in writing a program?

0 Answers  






printf("%d",(printf("Hello")); What it returns?

32 Answers   TCS,


how many key words availabel in c a) 28 b) 31 c) 32

0 Answers  


What is the difference between the expression “++a” and “a++”?

0 Answers  


Can a variable be both static and volatile in c?

0 Answers  


what about "char *(*(*a[])())();"

3 Answers   Oracle,


plz answer..... a program that reads non-negative integer and computes and prints its factorial

2 Answers  


Write a program to print all the prime numbers with in the given range

8 Answers   ABC, College School Exams Tests, TCS,


Categories