Skip to main content

C/C++ Programming Placement Papers Questions (C Quiz - 4)

1. Which of the following is not true about an Integer Constant in ‘C’ programming language?
[A]It should have at least one digit
[B]It must not have a decimal point
[C]Commas or blanks are allowed within an Integer Constant
[D]It can be either positive or negative

2. Which of the following is not true about static variable in ‘C’ language?
[A]It is stored in memory
[B]Its default initial value is zero
[C]Value of the variable persists between different function calls
[D]It is initialized more than once in a program

3. Class(es) of data types supported by ANSI C is/are
I. User defined data types.
II. Empty data set.
III. Derived data types.
[A]Only (I) above
[B]Only (II) above
[C]Both (I) and (II) above
[D]All (I), (II) and (III) above

4. Which of the following statements in ‘C’ programming language tests the value of a given variable against a list of case values and when a match is found, a block of statements associated with that case is executed?

5. Which of the following decision-making statements is used in a “C” program when it is necessary to execute the body of the loop before the test is performed?
[A]The if statement
[B]The if-else statement
[C]The switch statement
[D]The do statement

6. Which function is used to read an integer to a file in a “C” program?

7. The difference between structures and unions used in a “C” program is
I. Structure is a method for packing data of different types whereas union is used for packing data of same type.
II. In Structures, each member has its own storage location whereas all the members of a union use the same location.
III. A Structure is declared using the key word ‘struct’ whereas union is declared using the keyword ‘union’.
[A]Only (I) above
[B]Only (II) above
[C]Both (I) and (III) above
[D]Both (II) and (III) above

8. The “ % ” symbol used in the statement of “C” program is a
[A]Decision character
[B]Conversion character
[C]Data type character
[D]Printable character

9. Which of the following is a user-defined function in “C” language?
[A]main ()
[B]printf ()
[C]scanf ()
[D]fprintf ()

10. Mr. Ravi, writing a ‘C’ program, wants to print the student name, enrollment number and marks of 10 students. So, which of the following can be used to group these data items of different data types under a common name?
[D]Storage Class

11. Sandra, an experienced ‘C’ programmer wants to develop a new application for Bus reservation system. The application uses 20 variables and 40 functions. In which of the following ways does she have to define variables to retain their values even after the control is transferred to the calling function?

12. Mr. Bawachi, wrote a ‘C’ program for displaying first 20 even numbers. But after executing the program the answer was shown with decimal numbers. Which of the following data type characters was used in the program for printing?
[A]% f
[B]% x
[C]% h
[D]% i

13. In a ‘C’ program, Mr. Narendra used three variables and one of them is ‘int’. After the compilation, the syntax error was shown. So which of the following rules with respect to variables in C language is violated?
[A]Variables should begin with a letter
[B]Variables are case sensitive
[C]Variable names should not be keywords
[D]Spaces are not allowed

14. Mr. Gopal, working on a ‘C’ program has to test more than one condition to arrive at the right decision. So which of the following operators will be helpful for him?
[A]Increment operators
[B]Bitwise operators
[C]Arithmetic operators
[D]Logical operators

15. Which of the following statements in ‘C’ language will help Mr. Surya, to test the value of a given variable against a list of case values and when a match is found, a block of statements associated with that case is executed?


Popular posts from this blog

Email Etiquette Quiz

1. Which of the following is considered to be poor e-mail etiquette? [A]Have a proper sign off: Regards, Sincerely, etc. [B]Responding to messages as soon as possible [C]Using different colors/fonts/formatting to emphasize certain words [D]Keeping the message personal 2. What should be the tone of a professional email message? [A]Formal [B]Casual [C]Formal with slight usage of slangs [D]Conversational 3. What is the purpose of the BCc field? [A]To send copies of business e-mail to coworkers without the knowledge of boss [B]To respect contact's privacy [C]To keep e-mail looking clean [D]To send copies to anyone you want 4. What is the best way to send a very large attachment? [A]Compress the file (zip it up) [B]Send it first thing in the morning so that person can look into it with fresh mind [C]Send it only during weekend when traffic is low [D]Compress the file, then ask first when would be the best time to e-mail it 5. What is Flame? [A]A post or email message that exhibi

Krishna Janmashtami Quiz

1. Krishna Janmashtami is an annual Hindu festival that celebrates the birth of Krishna, the ____________ avatar of Vishnu. [A]Sixth [B]Seventh [C]Eighth [D]Ninth 2. Krishna was the son of? [A]Devaki [B]Vasudeva [C]Kansa [D]A & B 3. Janmashtami is an important festival particularly to which tradition of Hinduism? [A]Shaivism [B]Shaktism [C]Smartism [D]Vaishnavism 4. Which festival is celebrated every August/September, the day after Krishna Janmashtami mainly in Maharashtra? [A]Makhan Handi [B]Dahi Handi [C]Ghee Handi [D]Mitti Handi 5. In which city Bhagwan Krishna was born? [A]Dwarka [B]Vrindavan [C]Mathura [D]Kurukshetra 6. Janmashtami or Sri Krishna Jayanti celebrates the birthday of Krishna. It is also known by which name in Maharashtra and South India? [A]Gokulashtami [B]Bal Ashtami [C]Krishna Ashtami [D]Nandashtami 7. Fiji's Janmastami celebrations last for eight days, leading up to the eighth day, the day Krishna was born. Janmastami in Fiji is known as [A]G

Class 2 | Means of Communication | EVS General Awareness | Quiz

1. We keep in touch with everyone through- means of communication means of transport means of production none 2. Which of the following are personal means of communication? Letter Mobile e-mail All of the above 3. We post our letters in a - Wooden Box Almirah Letter box Bank 4. From where do we get postal stamps? Bank Post office Milk booth Grocery shop 5. Which of the following are means of mass communication? Radio Newspaper Telephone Radio and Newspaper 6. Which of the following is NOT a means of personal communication? Radio Letter Post card Fax 7. Which means of communication will you use to call your friend for your birthday party? Newspaper Television Mobile Letter 8. Urgent messages were earlier sent by telegram. The message in a telegram had to be ___________ as each word was paid for. Long Short No message is sent by telegram Very long 9. Which of the following are also called modern means of communication? Telephone Mobile e-mail All of the above 10. Which of the following i