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

What are the different types of constants?

0 Answers  


How many types of functions are there in c?

0 Answers  


How can you invoke another program from within a C program?

0 Answers  


for example user gives input as " 20 or 20.0 or rs 20.0 or 20.00 or rs20 and so .. on " and the output should be stored as " rs.20.00 " in a variable

2 Answers  


What do you mean by a sequential access file?

0 Answers  






How to explain the final year project as a fresher please answer with sample project

0 Answers  


How to implement variable argument functions ?

1 Answers   HP,


How can I prevent other programmers from violating encapsulation by seeing the private parts of my class?

1 Answers  


How do I read the arrow keys? What about function keys?

0 Answers  


What is string function c?

0 Answers  


what is the use of ~ in c lang?????

3 Answers  


What does sizeof function do?

0 Answers  


Categories