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 structure of c program?
Read the following data in two different files File A: aaaaaaaadddddddd bbbbbbbbeeeeeeee ccccccccffffffff File B: 11111111 22222222 33333333 By using the above files print the following output or write it in the Other file as follows aaaaaaaa11111111dddddddd bbbbbbbb22222222eeeeeeee cccccccc33333333ffffffffffff
What is new line escape sequence?
What is the return type of sizeof?
What is output redirection?
void main(){ int a; a=1; while(a-->=1) while(a-->=0); printf("%d",a); }
What is meant by int main ()?
If you know then define #pragma?
What is the general form of function in c?
What is static memory allocation?
What is a lvalue
What is the ANSI C Standard?
What does. int *x[](); means ?
What are 'near' and 'far' pointers?
If errno contains a nonzero number, is there an error?