1
232
34543
4567654
can anyone tell me how to slove this c question

Answer Posted / anna

#include <stdio.h>

int main ()
{
int i;
for(i = 1; i <= 5; i++)
{
int k;
for(k = 0; k < 11 - i; k++)
{
printf(".");
}

int j;
for(j = 0; j < i; j++)
{
printf("%d", i + j);
}

for(j -= 2; j >= 0; j--)
{
printf("%d", i + j);
}

printf("\n");
}

return 0;
}

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is it valid to address one element beyond the end of an array?

675


What is the full form of getch?

585


In a switch statement, what will happen if a break statement is omitted?

604


What are the application of void data type in c?

719


write a C program: To search a file any word which starts with ?a?. If the word following this ?a? starts with a vowel.Then replace this ?a? with ?a? with ?an?. redirect with the output onto an output file.The source file and destination file are specified by the user int the command line.

2455






How do you print only part of a string?

615


What is character constants?

715


What are the functions to open and close file in c language?

730


Does * p ++ increment p or what it points to?

618


Why c is a mother language?

557


What do you mean by dynamic memory allocation in c?

652


What is a structure member in c?

550


Is stack a keyword in c?

637


What is calloc malloc realloc in c?

594


What does the error 'Null Pointer Assignment' mean and what causes this error?

743