You are on page 1of 2

Write an Algorithm and flowchart to check whether a number is positive, negative or zero

using switch case.


Write a Program to Check Whether a Number is Prime or not.
Explain conditional operators used in C language with proper examples.

Explain the following with proper example:

a) break b) continue
WAP to accept 3 numbers and to find the largest of three numbers using nested if-else.
Differentiate between entry and exit controlled loop with an example
Write a program to display the following pattern.
*
**
***
****
*****
Problem Statement: Classify a person's age group and determine if they are eligible to vote.
A person under 18 is a minor, between 18 and 65 is an adult, and above 65 is a senior.Only
adults and seniors are eligible to vote.
(WAP using nested if else)
Write down the range of different datatypes in c .
Increment and decrement operators in C
void main()

{int a=5,c,d;
b=++a;
c=a++;
d=++a;
printf(“%d”,a);
}

#include<stdio.h>
int main()
{
int m=10;
int n, n1;

n=++m;
n1=m++;
n--;

--n1;
n=n-n1;
printf(“%d”,n);
return 0;
}

void main()

{
int a=3,b=4,c;
c=++a+b--;
printf(“value of c%d\n”, c);
c=a+++--b;
printf(“value of c%d\n”, c);

You might also like