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 is a #include preprocessor?
How to declare a variable?
we called a function and passed something do it we have always passed the "values" of variables to the called function. such functions calles are called a) calls by reference b) calls by value c) calls by zero d) none of the above
Are negative numbers true in c?
explain how do you use macro?
code for replace tabs with equivalent number of blanks
Between macros and functions,which is better to use and why?
Can a local variable be volatile in c?
Difference between malloc() and calloc() function?
A function can make the value of a variable available to another by a) declaring the variable as global variable b) Passing the variable as a parameter to the second function c) Either of the two methods in (A) and (B) d) binary stream
What is methods in c?
How are structure passing and returning implemented?
What is character set?
What is malloc() function?
What are two dimensional arrays alternatively called as?