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 are the features of c language?

0 Answers  


Suppose we have a table name EMP as below. We want to perform a operation in which, I want to change name ‘SMITH’ from as ‘SMITH JAIN’. Also I want to change the name of the column from ENAME to E_NAME. EMPNO ENAME JOB MGR HIREDATE SAL 7369 SMITH Coder 7902 17-DEC-80 800 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 7521 WARD SALESMAN 7698 22-FEB-81 1250

0 Answers  


Why is C language being considered a middle level language?

0 Answers  


What is queue in c?

0 Answers  


Read N characters in to an array . Use functions to do all problems and pass the address of array to function. 1. Print only the alphabets . If in upper case print in lower case vice versa.

1 Answers  


What is break statement?

0 Answers  


What are called c variables?

0 Answers  


How are strings stored in c?

0 Answers  


What will be the outcome of the following conditional statement if the value of variable s is 10?

0 Answers  


provide an example of the Group by clause, when would you use this clause

0 Answers  


How can I remove the trailing spaces from a string?

0 Answers   Aspire,


How to set file pointer to beginning c?

0 Answers  


Categories