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 |
What is meant by initialization and how we initialize a variable?
When should structures be passed by values or by references?
Program will then find the largest of three numbers using nested if-else statements. User is prompted to enter three numbers. Program will find the largest number and display it on the screen. All three numbers entered by the user are also displayed. If user enters 21, 33, and 5, the output should be as follows: You entered: 21, 33 and 5. The largest number is 33.
write a c program to print the next of a particular no without using the arithmetic operator or looping statements?
main() { int x=5,y=10,z=0; x=x++ + y++; y=y++ + ++x; z=x++ + ++y; printf("%d%d%d\n",x,y,z); }
a program that performs some preliminary processing in C, it acts upon certain directives that will affect how the compiler does its work a) compiler b) loader c) directive d) preprocessor
What is variable and explain rules to declare variable in c?
how to use enum datatype?Please explain me?
Is calloc better than malloc?
how the compiler treats any volatile variable?Explain with example.
What is "Hungarian Notation"?
Write a code to generate a series where the next element is the sum of last k terms.