Pps Unit 1 No Info
Pps Unit 1 No Info
4 Marks
#include<stdio.h>
int main ( )
{
printf(“%d”, 4 % 3);
printf(“ %d”, 4 % -3);
printf(“ %d”, -4 % 3);
printf(“ %d”, -4 % -3);
return 0;
}
26. Difference between formatted & unformatted statement ?
27. What is mean by storage class of variable?
28. Solve the following program and find its output:
#include<stdio.h>
int main ( )
{
int x=3,y, z;
z = y = x;
z* = y = x * x;
printf(“x=%d y=%d,z=%d”, x,y,z);
return 0;
}
29. Write a C Program to get Principal, Rate of Interest and No of Years as input from the
user and calculate the simple interest.
30. If a four digit number is input through the keyboard, write a C program to obtain the
sum of the first and last digit of the number.
31. If the total selling price of 15 items and the total profit = 25% is input through the
keyboard, write a C program to find the cost of one item.
32. Explain with example ++i and i++.
33. Solve the following expression using C Programming: (a+b) 2
34. Solve the following program and find its output:
#include<stdio.h>
int main( )
{
int a = 10;
a = a++;
printf(“%d\n”,a);
a = ++a;
printf(“%d\n”,a);
a = a--;
printf(“%d\n”,a);
a = --a;
printf(“%d\n”,a);
return 0;
}
12 Marks: