Print the foll in C...eg when n=5 the o/p must b
+ +
+ + + +
+ + + + +
+ + + +
+ +



Print the foll in C...eg when n=5 the o/p must b + + + + + + + + + + + + + + + + ..

Answer / ataraxic

char *m[] = { "+ +", "++ ++", "+++++" };
for (i=1; i <= 5; i++)
printf("%s\n", m[5%i]);

Is This Answer Correct ?    1 Yes 4 No

Post New Answer

More C Interview Questions

Go through the following code sinippet char a[20]; a="Hello Orcale Test"; will this compile?

4 Answers   Oracle,


Is there any book to know about Basics of C Language?

4 Answers  


HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????

0 Answers  


can any one please explain, how can i access hard disk(physical address)? it is possible by the use of far,near or huge pointer? if yes then please explain......

0 Answers  


What is the difference between near, far and huge pointers?

0 Answers  






f() { int a=2; f1(a++); } f1(int c) { printf("%d", c); } c=?

7 Answers   Geometric Software,


What is cohesion in c?

0 Answers  


When I set a float variable to, say, 3.1, why is printf printing it as 3.0999999?

0 Answers  


Can the sizeof operator be used to tell the size of an array passed to a function?

0 Answers  


What is string function c?

0 Answers  


what is difference between array,strutter,union and pointers

3 Answers   CTS, Lovely Professional University, Mannar Company,


Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)

2 Answers   Cap Gemini, HCL,


Categories