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

how can i calculate mean,median,mode by using c program

1 Answers   HCL,


Why is it important to memset a variable, immediately after allocating memory to it ?

0 Answers  


What are linked lists in c?

0 Answers  


What is switch in c?

0 Answers  


what is the hexidecimal number of 4100?

16 Answers   Google,






What does volatile do?

0 Answers  


Is it better to use malloc() or calloc()?

0 Answers   Aspire, Infogain,


in any language the sound structure of that language depends on its a) character set, input/output function, its control structures b) character set, library functions, input/output functions its control structures c) character set, library functions, control sturctures d) character set, operators, its control structures

0 Answers  


macros and function are related in what aspect? a)recursion b)varying no of arguments c)hypochecking d)type declaration

12 Answers   HCL, Infosys, Microsoft,


In this assignment you are asked to write a multithreaded program to find the duplicates in an array of 10 million integers. The integers are between -5000,000 to 5000,000 and are generated randomly. Use 10 threads, each thread works on 1000,000 integers. Compare the time needed to accomplish the task with single thread of execution program. Do not include the time to fill the array with integers in the execution time.

0 Answers  


How to add two numbers with using function?

4 Answers  


how memory store byte

4 Answers   Huawei,


Categories