Home / MCQ Bank / Computer
Computer Arrays And Strings In C Plus Plus

What is the correct syntax for declaring a two-dimensional array in C++?

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option A • int arr[rowSize][colSize]

Related Computer Questions

What will be the output of the following Java code snippet? public class Shape { public int area() { return 1; } } public class Rectangle extends Shape { public int area() { return 3; } } class Main() { public static void main(String[] args) { Shape shape = new Shape(); Rectangle rect = new Rectangle(); shape = rect; System.out.println(shape.area()); } } What will be the output of the following C++ code? #include <iostream> #include <string> using namespace std; class complex { int i; int j; public: complex(){} complex(int a, int b) { i = a; j = b; } complex operator+(complex c) { complex temp; temp.i = this->i + c.i; temp.j = this->j + c.j; return temp; } void operator+(complex c) { complex temp; temp.i = this->i + c.i; temp.j = this->j + c.j; temp.show_poss(); } void show(){ cout<<"Complex Number: "<<i<<" + i"<<j<<endl; } void show_poss(){ cout<<"Your result after addition will be: "<<i<<" + i"<<j<<endl; } }; int main(int argc, char const *argv[]) { complex c1(1,2); complex c2(3,4); c1 + c2; return 0; } Which is the correct example of a binary operator? What is the function of the Hadoop FileOutputFormat? A(n)____________language reflects the way people think mathematically.