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. Ratan Tata was the Chairman of which of the following conglomerates? Reliance Industries Aditya Birla Group Infosys Tata Group 2. ...
-
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. We keep in touch with everyone through- means of communication means of transport means of production none 2. Which of the following are ...
-
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. Guess the logo? Hint:Italian manufacturer of high-end leather goods, clothing, and other fashion products. 2. Guess the logo? Hint:It...
-
31 March 2013 Logo Game Quiz. Guess the logo? [Category: Banks in World] Hint:It is a Spanish banking group and is the largest bank in the E...
-
Programming C Java Information Technology IT Aptitude Database Management System Database Computer Awareness Basic Comput...
-
1. Veer Savarkar is also known as _____? [A]Father of the Nation [B]Father Of Hindutva [C]Father of Bombay [D]Father of Jainism 2...
-
1. When is the Prayagraj Mahakumbh 2025 scheduled to take place? January 1 - February 15, 2025 January 13 - February 26, 2025 February 1 -...
-
This time the quiz is focused on Banking Industry. Check out how familiar you are with these banks' logos. 1. Guess the logo? Hint:Estab...
No comments:
Post a Comment