Print the foll in C...eg when n=5 the o/p must b
+ +
+ + + +
+ + + + +
+ + + +
+ +
Answer Posted / 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 View All Answers
In C programming, what command or code can be used to determine if a number of odd or even?
Explain what is output redirection?
When should a type cast not be used?
With the help of using classes, write a program to add two numbers.
What is the general form of #line preprocessor?
One of the Institutes contains 5 student groups. Every group contains 4 students. Institute wants to store student group’s details in array. Group should contain group member’s details (name and registration number and age), project name, and mark of the group.
Write the syntax and purpose of a switch statement in C.
What is the best way to comment out a section of code that contains comments?
Why header files are used?
Can an array be an Ivalue?
What is static and auto variables in c?
What is omp_num_threads?
Write a program to generate random numbers in c?
Can you mix old-style and new-style function syntax?
Once I have used freopen, how can I get the original stdout (or stdin) back?