Programming basics questionnaire (not specific to any technology, platform or language).
Question 1. What is the difference between a high-level language and a low-level language? Select all the correct answers (more than one can be correct)
- A high-level language is one, which is used to write a program in an assembly or machine code and a low-level language is one that is used to write a program, using a human-readable language.
- A low-level language is one, which is used to write a program in an assembly or machine code and a high-level language is one, which is used to write a program, using a human-readable language.
- A program written, using a high level language requires the use of a compiler or an interpreter, whereas one written, using a low-level language does not need it.
- A program written, using a low level language requires the use of a compiler or an interpreter, whereas one written, using a high-level language does not need it.
Question 2. Which of the following is true about a computer program? (more than one can be correct)
- A program is a statement, that the computer executes.
- A program is a set of the statements, that the computer executes.
- A program may contain zero or more statements.
- A program must contain at least one statement.
Answer - 2 & 4
Question 3. What do you mean by a “programming statement”?
- A statement is a program in itself.
- A statement is an instruction or a command to the computer to do something.
- A statement is a comment.
- None of the above.
Answer - 2
Question 4. How many bits does a “nibble” contain and how many nibbles does a “byte” contain?
- A nibble contains 2 bits and a byte contains 2 nibbles.
- A nibble contains 2 bits and a byte contains 4 nibbles.
- A nibble contains 4 bits and a byte contains 2 nibbles.
- A nibble and byte are unrelated.
Answer - 3
Question 5. In any program, when you declare a variable ‘x’, what does ‘x’ signify?
- x contains an address.
- x signifies nothing.
- x is the name given to the memory allocated by the runtime to hold the data.
- None of the above.
Answer - 3
Question 6. Which of the following is true about a variable? (more than one can be correct)
- A variable can contain the data.
- A variable can only contain the data.
- A variable can contain an address.
- A variable cannot contain an address.
Answer - 1 & 3
Question 7. What is a pointer?
- A pointer is the name given to the memory, allocated by the runtime to hold the data.
- A pointer contains user data.
- A pointer is a variable, which contains a memory address as its data.
- None of the above.
Answer - 3
Question 8. Which of the following is true about the “scope of a variable”? (more than one can be correct)
- Scope means that the variable will be visible outside the program or the code block in which it is declared.
- Scope means that the variable will not be visible outside the code block in which it is declared.
- Once a variable goes out of the scope, it remains in the memory till the program is terminated.
- Once a variable goes out of the scope, it is destroyed (i.e., removed from memory).
Answer - 2 & 4
Question 9. Which of the following is true for a function? (more than one can be correct)
- A function is strictly a program.
- A function is a named block of the code, which can be executed (called), whenever required.
- A function may or may not return a value.
- A function must always return a value.
Answer - 2 & 4
Question 10. What is meant by “passing a variable by reference”?
- It means passing a copy of the variable to the calling function or the method.
- It means passing the address of the variable to the calling function or the method.
- It means creating a new variable, using this variable and then passing the new variable.
- None of the above.
Answer - 2
Question 11. What is the difference between the logical ‘AND’ and bit-wise ‘AND’ operators?
- They are the same.
- Bit-wise ‘AND’ is used for testing a true/false condition, whereas logical ‘AND’ is used to mask the value of a variable with that of the another variable.
- Logical ‘AND’ is used for testing true/false condition, whereas bit-wise ‘AND’ is used to mask the value of a variable with that of the another variable.
- None of the above.
Answer - 3
Question 12. Which of the following type of class allow only one object to be created?
- Friend Class.
- Singleton Class.
- Abstract Class.
- None of the above.
Answer - 2
Question 13. Which of the following concepts determines at the runtime and is a method to invoke?
- Polymorphism.
- Data Hiding.
- Dynamic Loading.
- Dynamic Binding.
Answer - 4
Question 14. A computer system that permits the multiple users to run the programs at the same time is called?
- Multi-tasking System.
- Real time System.
- Time Sharing System.
- Multi-programming System.
Answer - 1
Question 15. SQL stands for.
- Simple Querying Language.
- Structured Querying Language.
- Simplified Query Language.
- Structured Query Language.


Dinesh GabhanePosted Nov 7, 2019, 7:59 PM EST
Thanks for Sharing
komal kharbandaPosted Mar 28, 2017, 12:15 PM EDT
Sir i have a question: in question 11 bit-wise'AND' is used to mask the value of one variable with that of another variable. What does this mean??
komal kharbandaPosted Mar 28, 2017, 12:13 PM EDT
Thank you sir for such questions these really help us.
Khaja MoizuddinPosted Dec 5, 2016, 4:53 PM EST
Sure Thanks Sir.nice Article as Always.
Khaja MoizuddinPosted Dec 5, 2016, 4:28 PM EST
Yes vidya sir because once the answers seen just under the question it will distract user to read complete question and think which would be correct one.
Former memberPosted Dec 4, 2016, 4:40 PM EST
Thanks for sharing it. I learnt from it
Khaja MoizuddinPosted Dec 3, 2016, 3:53 AM EST
Vidya sir good article i learn new things like nibble etc. If the answers are written followed by all questions it would be more good i hope.
Banketeshvar NarayanPosted Nov 28, 2016, 8:51 PM EST
Thanks Vidya Vrat Agarwal sir for sharing all those good info with us.
Surya KantPosted Nov 27, 2016, 12:01 AM EST
I think ans is 2 and 4 because as per my knowladge function always return value where as procedure/method may or may not return value; please correct me if i am wrong.
Surya KantPosted Nov 27, 2016, 12:00 AM EST
Question 9. Which of the following is true for a function? (more than one can be correct)
SubashPosted Sep 20, 2016, 2:19 AM EDT
Nice share sir
Guest UserPosted Sep 20, 2016, 1:18 AM EDT
Its also very useful for beginner ....
Satish Kumar VadlavalliPosted Sep 19, 2016, 3:19 AM EDT
Good, my suggestion for you is change the options to (a,b,c,d) or answers to (1,2,3,4). Its not wrong, but will add readability
Manav PandyaPosted Sep 13, 2016, 6:25 AM EDT
Great post sir
Amatya AgyeyPosted Sep 10, 2016, 3:55 AM EDT
Cool.. Good as a beginner
Shamim UddinPosted Sep 4, 2016, 10:14 AM EDT
Nice post
Delpin Susai RajTOP 100Posted Aug 29, 2016, 3:37 AM EDT
Nice
Prasanna MuraliPosted Aug 28, 2016, 5:25 PM EDT
Nice post sir...
Rajib Das GuptaPosted Aug 26, 2016, 12:52 AM EDT
1.(2,3) 2.(1,2,4) 3.(2) 4.(3) 5.(3) 6.(1,3)7.(3) 8.(1,2,4) 9.(1,2,3) 10.(2) 11.(3) 12.(2) 13.(3) 14.(3) 15.(4).. Please correct me If I am wrong at any answer. Thanks for the questions.
Pankaj Kumar ChoudharyTOP 100Posted Aug 25, 2016, 6:35 PM EDT
Good Collection of question mostly answer are clear but waiting for answer sheet....
Mahesh ChandTOP 10Posted Aug 25, 2016, 5:30 PM EDT
Good one. I think should be moved to Career advice section. Currently, it is in ADO.NET.