C Language Daily Problems with Solutions

1.String \\ABC\\\ has a length of .

A. 11 B. 7 C. 5 D. 3

Answer Explanation: The string constant consists of several characters, and the string length does not count ‘\0’ (the null terminator character), so in this question, \\ is one byte, \” is one byte, A is one byte, B is one byte, C is one byte, \” is one byte, and \\ is one byte. The ‘\0’ is an invalid character when calculating length and is not counted, so the length is 7 bytes.

Difficulty:0.2 (Difficult)

Knowledge Point: Constant Variables

2. Fill in the blanks

1.A function consists of two parts, which are (1) and (2) .

AC source program must contain at least one (3) , which is (4) .

(1) Function Header (2) Function Body (3) Main Function (4) Primary Function

Leave a Comment