write a programming in c language,
1
3 5
7 9 11

Answers were Sorted based on User's Feedback



write a programming in c language, 1 3 5 7 9 11 ..

Answer / shaik shafi

#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,k;
clrscr();
k=1;
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
printf("%d ",k);
k=k+2;
}
printf("\n\n");
}
getch();
}

Is This Answer Correct ?    6 Yes 6 No

write a programming in c language, 1 3 5 7 9 11 ..

Answer / rehan

void main()
{
int i,j,k;
clrscr();
k=1;
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
printf("%d ",k);
k=k+2;
}
printf("\n\n");
}
getch();
}

Is This Answer Correct ?    2 Yes 4 No

Post New Answer

More C Interview Questions

What is the explanation for cyclic nature of data types in c?

0 Answers  


What is the use of getchar functions?

0 Answers  


Do you know what is a programing language ?

0 Answers  


What’s the special use of UNIONS?

0 Answers   ADP,


Write a program to print factorial of given number using recursion?

0 Answers  


Why pointers are used in c?

0 Answers  


WHAT IS HEADER?

8 Answers   ProKarma, TCS,


Can i use “int” data type to store the value 32768? Why?

0 Answers  


Should a function contain a return statement if it does not return a value?

0 Answers  


what is volatile in c language?

9 Answers   Cap Gemini, HCL, Honeywell, TCS, Tech Mahindra,


what is the little endian and big endian?

1 Answers  


What is #pragma directive?how it is used in the program? what is its advantages and disadvantages?

2 Answers  


Categories