Search Header Logo

Introduction to Object-Oriented Programming

Authored by Lemina Dsouza

Science

11th Grade

Introduction to Object-Oriented Programming
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the correct extension for a C program file?

.cpp

.java

.c

.cs

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which of the following is the correct syntax for the main function in C?

public static void main()

int main()

void main(String[] args)

function main()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which symbol is used to terminate statements in C?

:

.

;

,

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

How do you declare an integer variable named "age" in C?

var age;

integer age;

age = integer;

int age;

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which function is used to display output in C?

System.out.println()

Console.WriteLine()

printf()

cout<<

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following code do? scanf("%d", &num);

Prints the value of num to the screen

Reads an integer input from the user and stores it in the variable num

Converts num to a decimal number

Declares num as an integer variable

7.

MULTIPLE SELECT QUESTION

30 sec • 1 pt

What is the correct way to write a comment in C?

/+ This is a comment

# This is a comment

// This is a comment

/* This is a comment */

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?