Professional Documents
Culture Documents
Imp Questions in C
Imp Questions in C
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);