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 |
void main() { int i=1; printf("%d%d%d",i,++i,i++); } Cau u say the output....?
UINT i,j; i = j = 0; i = ( i++ > ++j ) ? i++ : i--; explain pls....
void main() { int i=7; printf("N= %*d",i,i); }
How to convert hexadecimal to binary using c language..
1 Answers Bajaj, GAIL, Satyam, Zenqa,
Why are memory errors hard to debug?
Declaration of Cube Guys please help me.. Is this a right way to declare cube.? If i Compile it. It Says: Cube undeclared what should i do? Please help \thanks in advanced #include<stdio.h> #include<math.h> #include<conio.h> main( ) { float x,y; while(x++<10.0) { printf("Enter Number:"); scanf("%d", &x); y = cube(x); printf("%f %f %f \n", x,pow(x,2),y); cube(x); } { float x; float y; y = x*x*x; } getch(); return (y); }
How to create a program that lists countries capitals when country is entered? (Terribly sorry, I'm a complete novist to coding with C, am looking for inspiration and general tips on how to code and create this program.)
what is the error in the following code: main() { int i=400,j; j=(i*i)/i; }
who was the present cheif governor of reserve bank of india
6 Answers State Bank Of India SBI,
How to upgrade LOOP environment, I just mean, how can i make loop statement editable ? I just try some program using loop statement and checking it in multiple compilers. Every compiler showing different output, what's the wrong ? is it a compiler based problem, or loop based problem, tell me why ? and what will be the debugging process, for this kind of problem ?
What is the out put of this programme? int a,b,c,d; printf("Enter Number!\n"); scanf("%d",&a); while(a=!0) { printf("Enter numbers/n"); scanf("%d%d%d",&b,&c,&d); a=a*b*c*d; } printf("thanks!"); getche(); Entering numbers are a=1,b=2,c=3,d=4 b=3,c=4,d=-5 b=3,c=4,d=0
What are the different types of errors in C and when they occur?