Quiz
ANTI BUG
Este quiz tem tempo limite, por isso abre no player de sempre.
Perguntas do quiz (15)
1What is the use of the finally keyword?
- AIt used to execute at the starting of the program
- BIt will be executed at the end of the program even if the exception arised
- CIt will be executed at the middle of the program even if the exception arised
- DIt will be executed at the starting of the program even if the exception arised
2In Java which keyword is used to handle the exception?
- Atry
- Bhandler
- Ccatch
- Dthrow
3How many object can be created of a Class in C++?
- Aonly one obejct can be created
- Bat most 100 objects
- CThere is no limit
- Dobjects can't be created using class
4The if..else statement can be replaced by which operator?
- ABitwise operator
- BConditional operator
- CMultiplicative operator
- DAddition operator
5Which part of memory is used for the allocation of local variables declared inside any function.
- AHeap
- BAddress space
- CStack
- DDepends on compiler
6#include<iostream>
using namespace std;
int main()
{
cout<<-1-1-1;
return 0;
}- A0
- B-3
- C6
- Derror
7int main()
{
if(0)
{
cout<<"Hi";
}
else
{
cout<<"Bye";
}
return 0;
}- ARun Time Error
- BBye
- CHiBye
- DHi
8 #include <iostream>
using namespace std;
int main()
{
int arr[] = {4, 5, 6, 7};
int *p = (arr + 1);
cout << *p;
return 0;
}- A4567
- B7
- C45
- D5
9. #include <iostream>
using namespace std;
int main()
{
int n = 15;
for ( ; ;)
cout << n;
return 0;
}- A15
- BCompile Time Error
- CIndefinitely
- DNone of the above
10What will be the final value of x in the following C code?
#include <stdio.h>
void main()
{
int x = 5 * 9 / 3 + 9;
}- A24
- BError
- CDepends on the compiler
- D5939
11 #include <iostream>
using namespace std;
int main()
{
int i;
enum month
{
JAN = 1, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC
};
for (i = MAR; i <= NOV; i++)
cout << i;
return 0;
}- A01234567891011
- B98765432
- C123456789101112
- D34567891011
12#include <iostream>
using namespace std;
int main ()
{
int a;
int * ptr_b;
int ** ptr_c;
a = 1;
ptr_b = &a;
ptr_c = &ptr_b;
cout << a << "\n";
cout << *ptr_b << "\n";
cout << *ptr_c << "\n";
cout << **ptr_c << "\n";
return 0;
}- A0xbffc9924
- B1
0xbffc9924
1
&1 - C1
1
1
0xbffc9924 - D1
1
0xbffc9924
1
13#include <iostream>
#include <string>
using namespace std;
int main () {
string str = "This*is^a.45min test.";
int i;
for (i = 0; i < str.length( ); i++) {
if (ispunct(str[i]))
str[i] = ’ ’; // a blank
str[i] = tolower (str[i]);
}
cout << str;
}- Athis is a 45min test.
- Bthis*is^a.45min test.
- Cthisisa45mintest
- Dthis is a 45min test
14class newthread extends Thread
{
Thread t1,t2;
newthread()
{
t1 = new Thread(this,"Thread_1");
t2 = new Thread(this,"Thread_2");
t1.start();
t2.start();
}
public void run()
{
t2.setPriority(Thread.MAX_PRIORITY);
System.out.print(t1.equals(t2));
}
}
class multithreaded_programing
{
public static void main(String args[])
{
new newthread();
}
}- Aerror
- Btruetrue
- Cfalsefalse
- Dtrue
15 import java.util.*;
class Output
{
public static void main(String args[])
{
TreeSet t = new TreeSet();
t.add("3");
t.add("9");
t.add("1");
t.add("4");
t.add("8");
System.out.println(t);
}
}- A[3, 4, 1, 8, 9]
- B[1, 3, 5, 8, 9]
- C[1, 3, 4, 8, 9]
- D[9, 8, 4, 3, 1]
Informações
- Descrição
- Quiz sobre ANTI BUG, criado por kashif malhan em 18-02-2020.
- Autor
- kashif malhan
- Idioma
- English
- Visualizações
- 83
- Avaliação
- Ainda sem avaliações Avalie este quiz