Professional Documents
Culture Documents
4. identify the numbers and tell the type of values and also check whether it is valid or
not
5280 320U 1456L 0x23 0X23 12,200 25-6
01 0783 0x12FF 23,25.67 54. .54 3e5
3e-2 ‘A’ ‘a’ “A” “a” “5+2” “#”
5. display the following strings using printf
a) It’s Raining!
b) To, continue, press the “RETURN” key
6. Print any 5 words in a separate line using single printf function
7. Display the following text using printf as below
--------------------------
SNo Name Marks
------- ------------------
1 Namratha 914
2 Lakshmi 878
--------------------------
8. Print your name vertically
9. Find the length of your name using printf
10. Which of the following is not a valid declaration in C?
short int x;
signed short x;
short x;
unsigned short x;
11. What is the output
#include<stdio.h>
int main()
{
unsigned int x = -1;
int y = ~0;
if (x == y)
printf("same");
else
printf("not same");
return 0;
}
12. For example variable x has value 347.5236
Print value of x with only 2 decimals i.e 347.52