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?
[A]Switch
[B]Break
[C]Case
[D]If-else-if
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?
[A]getc()
[B]putc()
[C]getw()
[D]putw()
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?
[A]Loop
[B]Structure
[C]Array
[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?
[A]Auto
[B]Static
[C]Extern
[D]Register
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?
[A]switch
[B]break
[C]for
[D]while
C/C++ Programming Placement Papers Questions (C Quiz - 4)
Subscribe to:
Post Comments (Atom)
Most Played Quizzes Last Week
-
1. Where was Guru Gobind Singh Ji born? [A]Patna [B]Anandpur [C]Amritsar [D]Bhopal 2. Guru Gobind Singh Ji was the _____ sikh guru? [A...
-
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 me...
-
1. Where did Atal Bihari Vajpayee born? [A]Gwalior [B]Lucknow [C]Balia [D]Kanpur 2. When did Atal Bihari Vajpayee born? [A]25 December 19...
-
1. There are two universities which are named in honour of Ahilya Bai. One is Devi Ahilya Vishwa Vidyalaya in Indore, Madhya Pradesh and the...
-
1. What was the old name of Varanasi(Banaras)? [A]Patliputra [B]Magadh [C]Indraprastha [D]Kashi 2. On which river bank Varanasi is situated...
-
1. Ratan Tata was the Chairman of which of the following conglomerates? Reliance Industries Aditya Birla Group Infosys Tata Group 2. ...
-
The Logo Quiz is dedicated to all the Logo and Quizzing enthusiasts across the world. This week's theme is Oil and Gas, Energy Sector. A...
-
Mental Ability and Logical Reasoning MCQs and Aptitude Quizzes Mental reasoning and general mental ability is one of the main topics o...
-
1. Conformance to the requirements: [A]Is the condition of the product or service in relation to customer‘s requirements [B]Is same as custo...
-
1. Guess the logo? Hint:It is a national agency of the Government of India, based in Hyderabad and formed by an act of Indian Parliament. ...
No comments:
Post a Comment