
Introduction to Object-Oriented Programming
Authored by Lemina Dsouza
Science
11th Grade

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
What is the correct extension for a C program file?
.cpp
.java
.c
.cs
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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
Which symbol is used to terminate statements in C?
:
.
;
,
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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
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

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?