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 |
write a programming in c to find the sum of all elements in an array through function.
whenever a question is posted in a particular category in allinterview.com, Is there any facility to receive an indication mail. For eg: I need to receive an indication email, whenever a question is posted under the category “C Langauage”.
Read two numbers from keyboard and find maximum of them?
How many ways are there to swap two numbers without using temporary variable? Give the each logic.
WHY DO WE USE A TERMINATOR IN C LANGUAGE?
Explain #pragma statements.
List some of the static data structures in C?
When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd
What is an volatile variable?
#include<stdio.h> int f(int,int); int main() { printf("%d",f(20,1)); return 0; } int f(int n,int k) { if(n==0) return 0; else if(n%2)return f(n/2,2*k)+k; else return f(n/2,2*k)-k; } how this program is working and generating output as 9....?
What is meant by operator precedence?
What is the difference between typeof(foo) and myFoo.GetType()?