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 |
Explain how can you determine the size of an allocated portion of memory?
1)what is the error in the following stmt where str is a char array and the stmt is supposed to traverse through the whole character string str? for(i=0;str[i];i++) a)There is no error. b)There shud be no ; after the stmt. c)The cond shud be str[i]!='\0' d)The cond shud be str[i]!=NULL e)i shud be initialized to 1
pierrot's divisor program using c or c++ code
Why is c faster?
Explain what is wrong in this statement?
Explain how can I remove the trailing spaces from a string?
the maximum width of a c variable name can be a) 6 characters b) 8 characters c) 10 characters d) 20 characters
what will be the output of "printf("%d%d",scanf("%d% d",&a,&b))".provide an explation regarding the question
What will be the output of the following program #include<stdio.h> void main() { int i=20; i-=i+++++i++; printf("%d",i); }
How many types of sorting are there in c?
WAP to accept rollno,course name & marks of a student & display grade if total marks is above 200?
Which command is more efficient? *(ptr+1) or ptr[1]