Search Header Logo

Crash Your Code Round 1

Authored by Manoj Kumar

Computers

University

Used 3+ times

Crash Your Code Round 1
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 2 pts

Which of these collections defines a DICTIONARY?

{"apple", "banana", "cherry"}

 

["apple", "banana", "cherry"]

("apple", "banana", "cherry")

{"name": "apple", "color": "green"}    

2.

MULTIPLE CHOICE QUESTION

1 min • 2 pts

What is the correct syntax to output the type of a variable or object in Python?

print(type(x))    Your answer  

print(typeof(x))

print(typeof x)

print(typeOf(x))

3.

MULTIPLE CHOICE QUESTION

1 min • 2 pts

The value of a string variable can be surrounded by single quotes.

False  

  

True

4.

MULTIPLE CHOICE QUESTION

1 min • 2 pts

What is the correct way to create an object called myObj of MyClass?

new myObj = MyClass();

MyClass myObj = new MyClass();      

class myObj = new MyClass();

class MyClass = new myObj();

5.

MULTIPLE CHOICE QUESTION

1 min • 2 pts

Which method can be used to replace parts of a string?

replaceString()

switch()

replace()    

repl()

6.

MULTIPLE CHOICE QUESTION

1 min • 2 pts

Assume that a character takes 1 byte. Output of following program?

#include<stdio.h>

int main()

{

char str[20] = "GeeksQuiz";

printf ("%d", sizeof(str));

return 0;

}

9

10

20

Garbage Value

7.

MULTIPLE CHOICE QUESTION

1 min • 2 pts

What is the use of "#pragma once"?

Used in a header file to avoid its inclusion more than once.

Used to avoid multiple declarations of same variable.

Used in a c file to include a header file at least once.

Used to avoid assertions

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?