What is the code for following o/p
*
* *
* *
* *
* *
* *
* *
* *
*
Answer / unknown
#include<stdio.h>
void main()
{
int i,j,k,num = 5;
for(i = num;i > 0;i--){
for(j = 1;j <= i;j++){
printf(" ");
}
for(k = (j - 1);k < num;k++){
if(k==j-1 || k==num-1)
printf("*");
else
printf(" ");
printf(" ");
}
printf(" \n");
}
for(i = num;i > 0;i--){
for(j = (num - i);j > 0;j--){
printf(" ");
}
for(k = 0;k < i;k++){
if(k==0|| k==i-1)
printf("*");
else
printf(" ");
printf(" ");
}
printf(" \n");
}
}
| Is This Answer Correct ? | 6 Yes | 1 No |
printy(a=3,a=2)
what is the error in the following code: main() { int i=400,j; j=(i*i)/i; }
To generate the series 1+3+5+7+... using C program
class test { int a; public: test(int b):a(b){} void show(){ cout<<a; } }; void main() { test t1; test t2(5); t1.show(); t2.show(); } }
What are the different types of errors in C and when they occur?
what is syntax error?
Write down the difference between c. Loop and goto statement d. (!0) and (!1) e. (1= =! 1) and (1!=1) f. NULL and !NULL
errors are known as?
3 Answers EX, State Bank Of India SBI,
what is meant for variable not found?
what is the large sustained error signal that eventually cause the controller output to drive to its limit
which typw of errors ? & how to solve it ?
How to reverse a linked list without using array & -1? Thank you.