WorksheetsProgramming C++
Total questions: 8
Worksheet time: 8mins
What will be displayed on the console ?
string str = "zqwyrqwou";
char ch = str[4];
Console.WriteLine(ch);
z
q
w
r
What will be displayed on the console after running this program?
char ch = (char)125;
Console.WriteLine(ch);
125
15
char
}
Which data type stores 1 character?
char
int
float
class
Select the line with the error.
while(true){}
while(1 == 1){}
while(int 1){}
while(false){}
What value can the "float" data type store?
12.5
string
=
void
How do I create a "float" array correctly?
float[] array =new string[10];
float[] array =new float[10];
float[] array = 1;
float[] =new float[10] array;
What value can the "int" data type store?
1.5
0.5 * 3
2
string
How do I create a loop that repeats 10 times ?
for ( i < 10) { }
for (int i = 0; i < 10; i++) { }
for (int i = 0; i < 10; ) { }
for (int i = 0;) { }
