Computer Science Mcqs | Programming With C Mcqs with Answers

computer science mcqs

NTS Computer Science Preparation easily done with below Mcqs. All kind of Mcqs are generated from chapter programing with c so you can clear any test or exam if you prepare Computer science mcqs.

Programming With C Mcqs with Answers | Computer Science Mcqs

Programming With C Mcqs with Answers | Computer Science Mcqs

186.If the machine in which this program is executed is little-endian (meaning, the lower signifi¬cant digits occupy lower addresses), then the output will be
(a) 0 (b) 99999999 (c) 1 (d) unpredictable
186. Choose the correct statements.
(a) Array stores data of the same type (b) Array can be a part of a structure
(c) Array of structure is allowed (d) Structure stores data of the same type
187. a —> b is syntactically correct if
(a) a and b are structures
(b) a is a structure and b is a pointer to a structure
(c) a is a pointer to a structure and b is a structure
(d) a is a pointer to a structure in which b is a field
188. A file is preferable to an array of structures because
(a) file lives even after the program that created it terminates
(b) Memory space will not be wasted
(c) there are many system tools to manipulate files
(d) there are language as well as system features to deal with files
189. The program
main()
int i = 5;
i = (++i) / (i++);
printf(‘%d’, i);
}
}
prints
(a) 2 (b) 5 (c) 1 (d) 6
190. If a file is opened in r+ mode then
(a) reading is possible (b) writing is possible
(c) it will be created if it does not exist (d) all the above comments arc true
191. ftell
(a) is a function
(b) gives the current file position indicator
(c) can be used to find the size of a file
(d) is meant for checking whether a given file exists or not

192. If a tile is opened in w+ mode then

(a) appending is possible
(b) leading is possible
(e) writing is possible
(d) after write operation reading is possible without closing and re-opening.

193. The fseek function
(a) needs 2 arguments
(b) makes the rewind function unnecessary
(c) is meant for checking whether a given file exists or not
(d) needs 3 arguments
194. The statement fseek(fp , 0L, , 0 ; – if syntactically correct. means
(a) fp is file pointer
(b) position the read-write-head at the start of the file
(o) position the read-write-head at the end of the file
(d) erase the contents of the file
195. The contents of a file will be lost if it is opened in
(a) a mode (b) w mode (c) w+ mode (d) a+ mode
196. Which of the following comments about union arc true?
(a) Union is a structure whose members share the same storage area.
(b)The compiler will keep track of what type of information is currently stored.
(c) Only one of the members of union can be assigned a value at a particular time.
(d)Size allocated for union is the site slits member needing the maximum storage.
197. Which of the following comments about the usage of structure is test?
(a) Storage class can be assigned to an individual member.
(b)Individual members can be initialized within a structure type declaration.
(c) The scope of a member name is confined to the particular structure. within which it is defined.
(d)None of the above.

 

 

Programming With C Mcqs with Answers | Computer Science Mcqs

mcqs of programming

You can also check it out 100 Mcqs of Operating System

 

Source

Leave a comment

* - Required fields