Answer Posted / sakthipriya
#include<stdio.h>
#include<conio.h>
void main()
{
int n=4, c, k, space, count = 1;
space = n;
for ( c = 1 ; c <= n ; c++)
{
for( k = 1 ; k < space ; k++)
printf(" ");
for ( k = 1 ; k <= c ; k++)
{
printf("*");
if ( c > 1 && count < c)
{
printf(" ");
count++;
}
}
printf("\n");
space--;
count = 1;
}
getch();
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is structure in c definition?
Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.
What is oops c?
write a program to rearrange the array such way that all even elements should come first and next come odd
What is the use of extern in c?
What does the function toupper() do?
How would you rename a function in C?
When should a far pointer be used?
The % symbol has a special use in a printf statement. Explain how would you place this character as part of the output on the screen?
Why use int main instead of void main?
The purpose of this exercise is to benchmark file writing and reading speed. This exercise is divided into two parts. a). Write a file character by character such that the total file size becomes approximately >10K. After writing close the file handler, open a new stream and read the file character by character. Record both times. Execute this exercise at least 4 times b). Create a buffer capable of storing 100 characters. Now after generating the characters, first store them in the buffer. Once the buffer is filled up, store all the elements in the file. Repeat the process until the total file size becomes approximately >10K.While reading read a while line, store it in buffer and once buffer gets filled up, display the whole buffer. Repeat the exercise at least 4 times with different size of buffer (50, 100, 150 …). Records the times. c). Do an analysis of the differences in times and submit it in class.
What is the difference between NULL and NUL?
What is a null string in c?
Is anything faster than c?
What is the right type to use for boolean values in c? Is there a standard type?