Final 3 PRF 192, Top Exam Questions and answers, 100% Accurate.
Final 3 PRF 192, Top Exam Questions and answers, 100% Accurate. 1. What is the index number of the last element of an array with 15 elements? a. Programmer - defined b. 15 c. 0 d. 14 D 2. Why to use fflush() library function? A. To flush all streams and specified streams B. To flush only specified streams C. To flush input/output buffer D. Invalid library function A 3. Name of algorithms for searching an element in an array? Select one: a. linear search, bubble search, selection search b. masking, flagging c. Linear search, binary search d. bubble search and binary search e. binary search, and selection search C 4. Select correct statement(s) Select one or more: a. We can use the assign operator to assign an array as a whole. b. We can not use the assign operators to assign an array as a whole. c. If a is an array then a and &a[0] are equivalent. d. If an array of primitive data type elements, we have to use assign operator to set values to each element... B C D 5. An element of an array can be identified by___ Select one: a. Its position in the array b. its name c. its value d. Its data type A 6. If "s" is a string variable, which of the following can be used to read the whole string "Hello SE1510"? a. gets(s) ("%[^ ]",s) c. scanf ("%s",s); d. scanf("%s", &s); A 7.Select correct statement which declare a pointer of type integer and assign an address of the variable age to it. a. int *p ; p=&age; b. int p*; p=&age; c. *int p; p=&age; d. int *p; p= age; A 8.The expression a[1] designates the first element in array a a. TRUE b. FALSE B 9. Array is ____ Select one: a. A group of different variables b. A group of elements which can have different data type c. A group of constants. d. A group of elements which have the same data type D 10. Binary search algorithm____ Select one:
Información del documento
- Subido en
- 12 de agosto de 2023
- Número de páginas
- 9
- Escrito en
- 2023/2024
- Tipo
- Examen
- Contiene
- Preguntas y respuestas