Example HTML page

C MCQ : Arrays and Strings

1. Which of the following is a right way to initialize an array?

a. int num[6] = { 1,2,3,4,5 };

b. int n{}= {1,2,3,4,5,6};

c. int n{6}={1,2,3,4,5};

d. int n(6)={1,2,3,4,5};

Answer : A

 

Example HTML page

Leave a Reply

Your email address will not be published. Required fields are marked *

Pin It on Pinterest