Basic syntax and structure

1 / 7

What is the output of this C++ code?

#include <iostream>
using namespace std;
int main()
{
int x = 3, y = 4;
cout << x + y;
return 0;
}

2 / 7

What is the output of this C code?

int main()
{
int x = 10;
x = x + 5;
printf("%d", x);
return 0;
}

3 / 7

C++ supports object-oriented programming, while C does not.

4 / 7

The main() function can return a value in both C and C++.

5 / 7

In C++, cout is used for output, while in C, printf is used.

6 / 7

Which of the following is a valid variable name in C/C++?

7 / 7

Which of the following is the correct entry point for a C or C++ program?

Your score is

The average score is 71%

0%