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 does it mean when the linker says that _end is undefined?

0 Answers  


Place the #include statement must be written in the program?

0 Answers  


My teacher ask to make a program that can: Insert record in front Insert record at the end Insert in between Search node record Delete record in front Delete record at the end Delete record in between Using Data structure Linked List type. But I'm really confused about the codes and I can't go through. Please help Thanks in advance. Also here is my unfinished code if someone can make changes it will be more good.

1 Answers  


What is your favorite subject?

1 Answers   Ericsson, Invendis, Tech Mahindra,


What is a spanning Tree?

1 Answers   TCS,






the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none

0 Answers  


Do pointers store the address of value or the actual value of a variable?

0 Answers   Fidelity,


if the area was hit by a virus and so the decrease in the population because of death was x/3 and the migration from other places increased a population by 2x then annually it had so many ppl. find our the population in the starting.

1 Answers   TCS,


When should I declare a function?

0 Answers  


What is void c?

0 Answers  


how to get the starting address of file stored in harddisk through 'C'program.

2 Answers   Siemens,


With the help of using classes, write a program to add two numbers.

0 Answers   TCS,


Categories