Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Question 6 If the program being debugged contains a variable p of type pointer t

ID: 2080427 • Letter: Q

Question

Question 6

If the program being debugged contains a variable p of type pointer to int, what's the effect of the following GDB command?

Question 6 options:

It prints the integer value stored at the address stored in p.

It computes the square of the value in p.

It does nothing, but produces no warning or error message.

It gives a syntax error.

Question 7

Lines starting with '#' are preprocessor directives.

Question 7 options:

Question 8

What does the following program do?

Question 8 options:

It prints 1,2,3.

It crashes.

It prints one weird-looking integer, possibly negative.

It prints 1.

Question 9

The printf and scanf functions are part of the core C language.

Question 9 options:

Question 10

Which of the following conversion letters may be used in printf's control string to print a floating point number?

Choose all that apply. You may want to consult the printf documentation.

Question 10 options:

u

g

G

s

f

e

A

It prints the integer value stored at the address stored in p.

B

It computes the square of the value in p.

C

It does nothing, but produces no warning or error message.

D

It gives a syntax error.

Explanation / Answer

Answers

Q6. Here p*p gives It computes the square of the value in p. so option B is correct.

Q7.Lines starting with '#' are preprocessor directives .it is True because when you use # the data us taken from predefined Library.

Q8.

The output prints 1,2,3

Q9.The printf and scanf functions are part of the core C language.It is true because without these functions we can not run the programme properly.

Q10.For floating number representation f is used .

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote