Electronics and Communication Engineering - Microprocessors - Discussion

Discussion Forum : Microprocessors - Section 5 (Q.No. 44)
44.
Consider the following in C

int k
float a ;
k = 4.2
a = 300


The values stored in computer memory for k and a are respectively
4.2 and 300
4 and 300 respectively
4.2 and 300.00 respectively
4 and 300.00 respectively
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
2 comments Page 1 of 1.

Surekha said:   9 years ago
K is an integer variable because the decimal point not allowed k=4 and a is real variable because decimal point allowed a=300.00.

Usha said:   1 decade ago
Integer should not contain decimal and float must be expressed in decimal.

Post your comments here:

Your comments will be displayed after verification.