Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


write a program for odd numbers?

Answers were Sorted based on User's Feedback



write a program for odd numbers?..

Answer / sharon

WAP in C to print series of odd no. upto the given num. using function and with arguments
#include<stdio.h>
#include<conio.h>
void odd(int);
void main()
{
int num;
clrscr();
printf("enter number");
scanf("%d",&num);
odd(num);
getch();
}
void odd(int num)
{
int i;
clrscr();
printf("od number upto the given numbers are");
for(i=1;i<=num;i++)
{
if(i%2!=0)
{
printf("%d\t",i);
}
}

Is This Answer Correct ?    1 Yes 2 No

write a program for odd numbers?..

Answer / monisha

#include<stdio.h>
#include<conio.h>
void main();
{
int n;
printf("Enter the number",n);
scanf("%d",&n);
for (i=1;i<=n;n+2)
printf("%d",i());
getch();
}

Is This Answer Correct ?    0 Yes 2 No

write a program for odd numbers?..

Answer / nilaksh

#include<stdio.h>
#include<conio.h>
void main()
{
int i, n;
clrscr();
printf("\nHow many odd numbers?");
scanf("%d",&n);
for(i=1;i<=n*2;i++)
printf("\n %d",i);
getch();
}

Is This Answer Correct ?    2 Yes 6 No

write a program for odd numbers?..

Answer / dally

#include<stdio.h>
int main()
{
int n,i;
printf("Enter values for n\n");
scanf("%d",&n);
for(i=0;i<=n;i++)
{
if(i%2 != 0)
printf("%d",i);
}
}

Is This Answer Correct ?    10 Yes 16 No

write a program for odd numbers?..

Answer / sameer.chaudhari

main()
{
int num;

printf("Plz enter the number :=> ");
scanf("%d",&num);

if (num & 1)
printf("odd");
else
printf("even");

getch();
}

Is This Answer Correct ?    22 Yes 43 No

Post New Answer

More C Interview Questions

How can you access memory located at a certain address?

0 Answers  


how to swap 4 number without using temporary number?

2 Answers  


Explain Doubly Linked Lists?

3 Answers  


int main(){ float f=8.0; if(f==8.0) printf("good"); else printf("bad"); } what is the answere and explain it?

3 Answers  


write a c/c++ program that takes a 5 digit number and calculates 2 power that number and prints it?

4 Answers  


Distinguish between actual and formal arguments.

0 Answers  


write a c program to find largest number in matrix(in each row,each column, diagonally, and in the whole matrix)? Its urgent.

2 Answers  


Why isn't any of this standardized in c? Any real program has to do some of these things.

0 Answers  


what will the following program do? void main() { int i; char a[]="String"; char *p="New Sring"; char *Temp; Temp=a; a=malloc(strlen(p) + 1); strcpy(a,p); //Line no:9// p = malloc(strlen(Temp) + 1); strcpy(p,Temp); printf("(%s, %s)",a,p); free(p); free(a); } //Line no 15// a) Swap contents of p & a and print:(New string, string) b) Generate compilation error in line number 8 c) Generate compilation error in line number 5 d) Generate compilation error in line number 7 e) Generate compilation error in line number 1

1 Answers   IBM,


what is the hardware model of CFG( context free grammar)

0 Answers   Microsoft,


Explain what are linked list?

0 Answers  


What is the difference between array and pointer in c?

0 Answers  


Categories