Basics Of C Test 3 - Online Test

Test Difficulty Level: Medium

Syllabus of Test

Electronics: Resistors, Capacitors, Diodes

Sample Question from this online test:

Question: What is the output of the following 'C' program ?

unsigned int a=0xffff;

Option A: ffff

Option B: 0

Option C: 00ff

Option D: None of these

To answer, click the "Start This Test" button below.

Start this Test


karthik ravi on 2011-10-19 05:07:38 wrote,

Basics of c 3:

Q17: the answer is not B. it will not print just strings.. there will be a char added along with the word strings. bcoz the array max length declared as 7 and the char also 7 in strings. so there is no place for null..

Q15: the answer is not C. '3' is a constant.. so its size is 2. when u consider 'A' is a constant in Q14, how come u miss that logic in Q15?

Q11: What are the options u have provided? Option A to D all are "printf(". please check this and prepare it well

Q9: U have mentioned the correct answer is A. where is the pointer which is suppose to be at the array? Please check it

Q4: the program which u have given will give u divide error bcoz u have done some mistake at j = 0*20. i think u thought of hex value 0x20. please check that and the answers are not matching if u put 0x20.

Anyway thanks for the question, some of the questions are really good..

Arupananda Pradhan on 2012-05-11 11:03:16 wrote,

Q15 : Here first '3' is your character thats why it is showing 1 byte.
"3" is a string and ended with null character thats why it is 2 byte and last one is your integer number so 2 byte..
I think this will clear your confusion