51. Which access specifier is used where one wants data members to be accessed by other classes but not from outside objects?
52. What is sequence container arrays?
53. Which of the following queue container can expand or shrink from both directions?
54. Which type of heap is implemented in STL heap?
55. What is meant by container ship?
56. From where does the template class derived?
57. Which function is used to position back from the end of file object?
58. Which of the following is the correct syntax of using pair p?
59. How one can restrict a function to throw particular exceptions only?
60. What will be the output of the following C++ code?
#include <stdio.h>
int main ()
{
int n;
FILE * p;
char buffer [5];
p = fopen ("myfile.txt", "w+");
for ( n = 'A' ; n <= 'D' ; n++)
fputc ( n, p);
rewind (p);
fread (buffer, 1, 5, p);
fclose (p);
buffer[3] = '\0';
puts (buffer);
return 0;
}
#include <stdio.h>
int main ()
{
int n;
FILE * p;
char buffer [5];
p = fopen ("myfile.txt", "w+");
for ( n = 'A' ; n <= 'D' ; n++)
fputc ( n, p);
rewind (p);
fread (buffer, 1, 5, p);
fclose (p);
buffer[3] = '\0';
puts (buffer);
return 0;
}Read More Section(C plus plus miscellaneous)
Each Section contains maximum 100 MCQs question on C plus plus miscellaneous. To get more questions visit other sections.
- C plus plus miscellaneous - Section 1
- C plus plus miscellaneous - Section 2
- C plus plus miscellaneous - Section 3
- C plus plus miscellaneous - Section 5
- C plus plus miscellaneous - Section 6
- C plus plus miscellaneous - Section 7
- C plus plus miscellaneous - Section 8
- C plus plus miscellaneous - Section 9
- C plus plus miscellaneous - Section 10
- C plus plus miscellaneous - Section 11
