Answer Posted / 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 |
Post New Answer View All Answers
What are the key features in c programming language?
What is dangling pointer in c?
Is null a keyword in c?
Write a program to use switch statement.
Are comments included during the compilation stage and placed in the EXE file as well?
Is c pass by value or reference?
What is 02d in c?
Explain the difference between structs and unions in c?
How variables are declared in c?
What are the basic data types associated with c?
Why c is a mother language?
What is this infamous null pointer, anyway?
Explain Function Pointer?
Where is volatile variable stored?
What are pointers really good for, anyway?