TCS ASPIRE: Basic Programming Quiz/questions | latest 2014

# Question 1 of 10 10.0 Points
What is a variable in a computer program?
A. An output
B. A value such as 5
C. The name given to a value
D. An input argument

Answer Key: C
[Tips:When you are writing a computer program, you will often want the program to be able to “remember” a value. You can do this by assigning the important value to a named variable. Variables are categorized by the types of data they store.] 

# Question 2 of 10 10.0 Points
What is a semantic error ?
A. A program error that is difficult to debug
B. A program error that is not so important to take care
C. A program error that crashes the program
D. A program error that gives wrong output

Answer Key: D
[Tips:If there is a semantic error in your program, it will run successfully, in the sense that the computer will not generate any error messages, but it will not do the right thing. It will do something else. Specifically, it will do what you told it to do.]

# Question 3 of 10 10.0 Points
A variable will last until
A. the value of the variable is used in the program
B. The program completes and exit
C. Hard disc is formatted
D. Computer is switched off

Answer Key: B
[Tips:The lifetime of a variable in the computer memory will be same as the life of the program. The memory is cleaned as soon as the program stops]

# Question 4 of 10 10.0 Points
In a Javascript program, the word preceding the “ . “ represents
A. A program name
B. An object
C. An action by an object
D. A command

Answer Key: B
[Tips:For eg.“Zygot.move()”. Here ‘Zygot’ is the object and ‘move’ is the action requested on that object]

# Question 5 of 10 10.0 Points
What do you mean by a portable computer program?
A. The program can be attached to the port of a computer
B. The program is very small
C. It can be run on computers with different types of computers
D. It can be send from one computer to another computer

Answer Key: C
[Tips: Portability is a characteristic attributed to a computer program if it can be used in an operating systems other than the one in which it was created without requiring major rework. Porting is the task of doing any work necessary to make the computer program run in the new environment.]

# Question 6 of 10 10.0 Points
A compiler will
A. Interpret the program line by line
B. Compile the program to create an executable
C. Link different programs written in same language together
D. Correct the errors in the program

Answer Key: B

[Tips:A compiler is a computer program (or set of programs) that transforms source codewritten in a programming language (the source language) into another computer language (the target language, often having a binary form known as object code). The most common reason for wanting to transform source code is to create an executable program]

# Question 7 of 10 10.0 Points
What do we mean by the performance of a program ?
A. The utilization of resources such as CPU and memory by a program
B. The number of times a program can be run
C. The number of arguments that a program can handle
D. The speed with which a program runs

Answer Key: A
[Tips:Computer performance is characterized by the amount of useful work accomplished by a computer system compared to the time and resources used.]

# Question 8 of 10 10.0 Points
What is debugging ?
A. Fine tuning the program for performance 
B. The process of tracking and correcting the bugs in a program
C. Testing the program to identify defects
D. The process of removing the identified bugs
Answer Key: B
[Tips:Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a computer program]

Question 9 of 10 10.0 Points
Data structure enables
A. Analysis of the data used in a program
B. Connecting a program with database
C. Storing and organizing data in computer memory for efficient use
D. Structuring data in a program

Answer Key: C
[Tips:Data structures are generally based on the ability of a computer to fetch and store data at any place in its memory, specified by an address—a bit string that can be itself stored in memory and manipulated by the program] 

# Question 10 of 10 10.0 Points
What is class in object oriented program ?
A. A collection of objects
B. A template to create objects
C. A variable type in a program
D. Category /Type of a program
Answer Key: B
[Tips:In the real world, you’ll often find many individual objects all of the same kind. There may be thousands of other bicycles in existence, all of the same make and model. Each bicycle was built from the same set of blueprints and therefore contains the same components. In object-oriented terms, we say that your bicycle is an instance of the class of objects known as bicycles. A class is the blueprint from which individual objects are created.]

No comments:

Post a Comment