Select the correct option to test your answer:
More Computer Questions
Which one of the following statements is used to create a table?
What will be the output of the following C++ code? #include <iostream> #include <vector> using namespace std; int main() { vector<int> v; for (int i = 1; i <= 5; i++) v.push_back(i); cout<<v.capacity()<<endl; v.resize(4); cout<<v.capacity()<<endl; return 0; }
What is the output of the following code? #include<stdio.h> int arr[31], len = 0; void recursive_dec_to_bin(int n) { if(n == 0 && len == 0) { arr[len++] = 0; return; } if(n == 0) return; arr[len++] = n % 2; recursive_dec_to_bin(n/2); } int main() { int n = 111,i; recursive_dec_to_bin(n); for(i=len-1; i>=0; i--) printf("%d",arr[i]); return 0; }
In C++, which access specifier allows the members of a base class to be accessible in the derived class as well as from outside the class?
Which of the following will never be displayed on executing print(random.choice({0: 1, 2: 3}))?