Basic Data Structures – Exercise – 1

Basic Data Structures » Exercise – 1

1. main ( ) is an example of :

(a) header
(b) statement
(c) library function
(d) user defined function

Answer
Answer : (c)
Explanation
Explanation : No answer description available for this question. Let us discuss.
Discuss
Discuss : Write your answer. Click here.

2. A global variable is a variable :

(a) declared in the main ( ) function.
(b) declared in any function other than the main ( ) function.
(c) declared outside the body of every function.
(d) declared any where in the C program.

Answer
Answer : (c)
Explanation
Explanation : No answer description available for this question. Let us discuss.
Discuss
Discuss : Write your answer. Click here.

3. While incrementing a pointer, its value gets increased by the length of the data type to which it points. This length is called :

(a) scale factor
(b) length factor
(c) pointer factor
(d) increment factor

Answer
Answer : (d)
Explanation
Explanation : No answer description available for this question. Let us discuss.
Discuss
Discuss : Write your answer. Click here.

4. The first digit of a decimal constant must be :

(a) a zero
(b) a non zero number
(c) a negative number
(d) an integer

Answer
Answer : (d)
Explanation
Explanation : No answer description available for this question. Let us discuss.
Discuss
Discuss : Write your answer. Click here.

5. What is the output of the following statement :

printf (“%-3d”,12345);

(a) 1 2 3 
(b) -1 2 3 
(c) 1 2 3 4 5 
(d) 12  

Answer
Answer : (c)
Explanation
Explanation : No answer description available for this question. Let us discuss.
Discuss
Discuss : Write your answer. Click here.

Related Posts

  • Basic Data Structures – 2Basic Data Structures » Exercise - 12. A global variable is a variable : (a) declared in the main ( ) function. (b) declared in any function other than the main ( ) function. (c) declared outside the body of every function. (d) declared any where in the C program.
    Tags: function, declared, basic, data, structures, variable, main, exercise, computer, science
  • Basic Data Structures – 1Basic Data Structures » Exercise - 1 1. main ( ) is an example of : (a) header (b) statement (c) library function (d) user defined function 
    Tags: basic, data, structures, function, exercise, main, statement, computer, science
  • Basic Data Structures – 4Basic Data Structures » Exercise - 14. The first digit of a decimal constant must be : (a) a zero (b) a non zero number (c) a negative number (d) an integer
    Tags: basic, data, structures, number, exercise, constant, integer, computer, science
  • Basic Data Structures – 7Basic Data Structures » Exercise - 17. Literal means : (a) a string (b) a string constant (c) a character (d) an alphabet
    Tags: basic, data, structures, string, exercise, constant, character, computer, science
  • Basic Data Structures – 3Basic Data Structures » Exercise - 13. While incrementing a pointer, its value gets increased by the length of the data type to which it points. This length is called : (a) scale factor (b) length factor (c) pointer factor (d) increment factor
    Tags: factor, data, length, basic, structures, pointer, exercise, computer, science