logo

Crowdly

Browser

Add to Chrome

Questions Bank (1580057 total)

Which of the following statements correctly describes the difference between static and dynamic memory allocation?
0%
0%
100%
0%
View this question
What will be the output of the following code?

#include <iostream>

using namespace std;

int main() {

    int a = 5;

    cout << a++ * ++a;

    return 0;

}

0%
0%
100%
0%
View this question
What will be the output of the following code?

#include <iostream>

using namespace std;

int main() {

    int i = 1, iterations = 0;

    while (i <= 10) {

        iterations++;

        i *= 2;           }

    cout << iterations;

    return 0; }

0%
0%
100%
0%
View this question
Which of the following is true about inheritance in object-oriented programming?
100%
0%
0%
0%
View this question
What will be the output of the following code?

#include <stdio.h>

#include <stdlib.h>

#include <iostream>

#include <string.h>

using namespace std;

int main() {

    int num = 45, num2;

    char str1[10], str2[10];

    sprintf(str1, "%d", num);

    strcpy(str2, str1);

    strcat(str2, "AD");

    num2 = atoi(str2);

    printf("Converted number: %X\n", num2);

    return 0;

}

100%
0%
0%
0%
View this question
Which of the following statements best describes polymorphism in object-oriented programming?
0%
0%
0%
100%
View this question
How many megabits (Mb) are there in 5 megabytes (MB)?
0%
0%
100%
0%
View this question
What will be the output of the following code?

#include <iostream>

using namespace std;

int func(int n) {

    if (n == 0)

        return 1;

    return n * func(n - 1);

}

int main() {

    cout << func(4);

    return 0;

}

0%
0%
0%
100%
View this question
Which of the following functions is used to dynamically allocate memory in C?
0%
0%
100%
0%
View this question
Which data structure uses the LIFO (Last In, First Out) principle?
9%
0%
91%
0%
View this question