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
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. The Logic should be written in Data Structures?
What is storage class?
Differentiate between full, complete & perfect binary trees.
What is c basic?
In c programming, explain how do you insert quote characters (? And ?) Into the output screen?
writ a program to compare using strcmp VIVA and viva with its output.
Differentiate between static and dynamic modeling.
What are register variables? What are the advantage of using register variables?
What is string length in c?
How can I do serial ("comm") port I/O?
What is sizeof in c?
what is use of malloc and calloc?
Explain how can type-insensitive macros be created?
What is selection sort in c?
What happens if you free a pointer twice?