Lec 02
Lec 02
a
int a;
…-1.6,0,1,1.5
c double c;
a,b,A,B,+,…
char d;
d
Variable Assign a=10;
Solve
Solve
Solve
Problem-4
Write a C program to find average of two integer number
and print them on the screen as follows:
Solve:
Placeholders Output Type
%d Integer number
%c Character
Solve:
Problem-6
Write a C program that take input 2 number from user and
find summation of two fraction number
Problem-7
Write a C program that take input a character from user and
print it on screen
Highest number in “int” data type
4 Byte
1 Byte = 8 Bit
232= 4294967296
-2147483648 to 2147483648
Type Cast (Type conversions)
• To convert one data type to another.
Find the
problem in
this program
Comments in C Program
Problem-8
Write a C program to find the third angle of a triangle by
taking two angle from the user
Print the result on the screen as follows:
Problem-8
Write a C program that take input temperature in oC scale
from user and convert it into oF scale by taking input from the
user