Question: Question II: Answer the following questions [ Total 2 5 marks ] : Q 1 . 2 : Which of the following is correct C

Question II: Answer the following questions [Total 25 marks]:
Q1.2: Which of the following is correct C code for printing a number? (Multiple answers)
[2 Marks]
a) printf("%d", int_variable);
b) printf("%f", double_variable);
c) printf("%c", int_variable);
d) printf("%s", double_variable);
Q2.2: Which of the following statements about C String are correct? Circle correct answers. (Multiple correct answers)
[3 marks]
a) In C there are no strings, just arrays of characters.
b) A string must terminate with the code '??0'(the NUL)(or zero).
c) In C a string is a variable type like in Java.
d) When declaring a C string as character array, always give enough size for the actual string plus NUL.
Q2.3: What is version control?
[3 marks]
Q2.4: What will the following program print out when it is executed? Circle correct answer.
(One correct answer).
[3 marks]a)010b)101c)1-10d)-110Q2.5: What will the following program print out when it is executed? Circle correct answer.(One correct answer).[3 marks]a) been rainingb) raining dayc) been alld) It's raining
Q2.6: The following code is supposed to print the name "Peter Smith", but it has errors. Find the errors and suggest how to correct them. (Multiple errors)
[4 marks]
 Question II: Answer the following questions [Total 25 marks]: Q1.2: Which

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!