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 a list in c?

0 Answers  


What is key word in c language?

4 Answers   ABC,


how should functions be apportioned among source files?

0 Answers  


Program to swap the any two elements in an array containing N number of elements?

1 Answers   Bosch, Glenwood, Ugam Solutions,


Can you explain what keyboard debouncing is, and where and why we us it? please give some examples

0 Answers   CSC, Wipro,






a value that does not change during program execution a) variabe b) argument c) parameter d) none

0 Answers  


I have a function which accepts, and is supposed to initialize,a pointer, but the pointer in the caller remains unchanged.

1 Answers  


how to create duplicate link list using C???

0 Answers  


Write a program in c to print 1 121 12321 1234321 123454321

11 Answers   ANR, College School Exams Tests, Mu Sigma, Wipro,


f(*p) { p=(char *)malloc(6); p="hello"; return; } main() { char *p="bye"; f(p); printf("%s",p); } what is the o/p?

7 Answers   Hughes,


Output for following program using for loop only * * * * * * * * * * * * * * *

3 Answers  


Differentiate between null and void pointers.

0 Answers   TCS,


Categories