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. What percentage of the Earth's surface is covered by water? 50% 60% 70% 75% 2. Which term refers to a large body of land? Island...
-
1. What was the birth name of Swami Vivekananda? [A]Vivekananda [B]Narendranath Dutta [C]Ramakrishna [D]Gour Mohan Mukherjee 2. What is ...
-
1. Which company announced on 30th July 2020 it's ventures in to Rs 5,300-crore bread industry as it trnasfroms from a pure dairy frim t...
-
1. There are many ways of experiencing the world around us. How we experience the inputs from the environment around us depends on many fact...
-
1. Import substitution in reality should be looked upon as "Import avoidance" [A]TRUE [B]FALSE 2. Deterioration & Obsolescenc...
-
1. Who on 8th October won 2014 Waislitz Global Citizen Award? [Category: MPSSB Exams Current Affairs] [A]Rong Han [B]Anoop Jain [C]Laura Lin...
-
1. In the Battle of Gibralter Bay (1606-37), the _________ defeated the Spaniards and the Portugese. [Category: History GK] [A]Dutch [B]Germ...
-
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...
-
Mental Ability and Logical Reasoning MCQs and Aptitude Quizzes Mental reasoning and general mental ability is one of the main topics o...
-
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...
No comments:
Post a Comment