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 |
which of 'arrays' or 'pointers' are faster?
What is wrong in this statement? scanf(“%d”,whatnumber);
Write an implementation of “float stringToFloat(char *str).” The code should be simple, and not require more than the basic operators (if, for, math operators, etc.). • Assumptions • Don’t worry about overflow or underflow • Stop at the 1st invalid character and return the number you have converted till then, if the 1st character is invalid return 0 • Don’t worry about exponential (e.g. 1e10), instead you should treat ‘e’ as an invalid character • Write it like real code, e.g. do error checking • Go though the string only once • Examples • “1.23” should return 1.23 • “1a” should return 1 • “a”should return 0
code for inverse a matrix
Hai what is the different types of versions and their differences
how does a general function , that accepts an array as a parameter, "knows" the size of the array ? How should it define it parameters list ?
if array a conatins 'n' elements and array b conatins 'n-1' elements.array b has all element which are present in array a but one element is missing in array b. find that element.
18 Answers Parexel, Ram Infotech, Zycus Infotech,
What do you mean by dynamic memory allocation in c? What functions are used?
main() { printf("\n %d %d %d",sizeof('3'),sizeof("3"),sizeof(3)); }
wat is output of the following int main() { const int j=2; int i; switch(i) { case 1:break; case j:break; default:break; } }
Explain what standard functions are available to manipulate strings?
What is operator promotion?