Computer Programming Flashcards
6 cards from real AMCAT practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 6 Computer Programming flashcards as text
What is the result of 7 % 3 in C?
Answer: 1
7 divided by 3 gives quotient 2 and remainder 1, so 7 % 3 = 1.
Which keyword is used to exit a loop prematurely in C/C++?
Answer: break
The 'break' statement immediately terminates the nearest enclosing loop or switch statement.
In object-oriented programming, which concept allows a class to inherit properties from another class?
Answer: Inheritance
Inheritance allows a child class to acquire properties and behaviors of a parent class.
What is the output of: print(type(3.14)) in Python?
Answer:
3.14 is a floating-point literal in Python, so its type is 'float'.
Which of the following is a valid way to declare a variable in Java?
Answer: int x = 10;
In Java, variables must be declared with explicit data types like 'int x = 10;' (though 'var' is valid from Java 10+).
What does HTML stand for?
Answer: HyperText Markup Language
HTML stands for HyperText Markup Language, the standard language for creating web pages.