Write a program in c to print
*
* *
* *
*******
Answer / kapil
#include<stdio.h>
void main()
{
int i=0,j=1;
while(i<3)
{
while(j<=7)
{
if(j-i==4||j+i==4)
printf("*");
else
printf(" ");
j++;
}
printf("\n");
i++;
j=1;
}
while(j<=7)
{
printf("*");
j++;
}
}
| Is This Answer Correct ? | 5 Yes | 2 No |
Explain how do you view the path?
Explain what is a program flowchart and explain how does it help in writing a program?
A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile
Look at the Code: #include<string.h> void main() { char s1[]="abcd"; char s2[10]; char s3[]="efgh"; int i; clrscr(); i=strcmp(strcat(s3,ctrcpy(s2,s1))strcat(s3,"abcd")); printf("%d",i); } What will be the output? A)No output B) A Non Integer C)0 D) Garbage
How do we open a binary file in Read/Write mode in C?
Why clrscr is used in c?
how to calculate the time complexity of a given algorithm? pls give exaples..mainly for the coplexities such as O(log n),O(n log n)...
Are there constructors in c?
can we declare a function inside the structure? ex: struct book { int pages; float price; int library(int,float); }b; is the above declaration correct? as it has function declaration?
where does malloc() function get the memory?
How can I delete a file?
What does void main () mean?