Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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]
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Instant Reference

Authors: Gruber, Martin Gruber

2nd Edition

0782125395, 9780782125399

More Books

Students also viewed these Databases questions