Home / Manisha Agrawal / Programming Language MCQs
Total questions: 239
Q. Which allows you to migrate your implementations over time without breaking the code that depends on the public interface of your classes?
Q. Which is used for writing data to a file in file handling?
Q. In which state is the thread after invocation of start() method, but the thread Scheduler has not selected it to be the running thread?
Q. Which package is used for analyzing code during run time?
Q. The JDK forms an extended subset of a software development kit (SDK)
Q. Which mechanism is provided to handle the runtime errors so that normal flow of the application can be maintained?
Q. Constructor does not perform other tasks instead of initialization
Q. In java, Method Overloading is possible by changing the return type of the method
Q. Garbage collection only occurs sporadically during the execution of your program
Q. Which allows you to define one interface and have multiple implementations?
Q. Write the output of the following code
Q. Write the output of the following
Q. Write the output of the following code :
Q. Write the output of the following:
Q. How many times the following loop will execute?
Q. How many times “Hello” will print
Q. How many times “Bye” will print:
Q. Syntax of ‘for’ loop is given below:
Q. Which of the following statement is not correct about ‘for’ loop?
Q. _________ function is used in for loops for generating a sequence of numbers.
Q. Which of the following parameter of range( ) function is optional?
Q. ________ statement terminates the current loop and resumes execution of the statement following that loop.
Q. _________ statement skips the execution of remaining statements inside the body of the loop for the current iteration and jumps to the beginning of the loop for the next iteration
Q. A loop inside another loop is called ______
Q. If the condition of the while loop is initially false, then the loop will execute ___
Q. Write the output of the following :
Q. Execution of which statement is not dependent on the condition?
Q. Which of the following statement will return error?
Q. Which of the following is an empty statement in python?
Q. Which of the following is jump statement in python?
Q. Which symbol is used to end loop and conditional statements?
Q. What will be the value of ‘m’ and ‘n’ after execution of following code:
Q. What will be the value of ‘n’ and ‘n1’ after execution of following code:
Q. Repetition of a set of statements in a program is made possible using _____________
Q. Which of the following value of ‘x’ makes the condition False in the given code?
Q. Which of the following symbol is used to end an ‘if’ statement in Python?
Q. Which of the following is not a conditional statement in Python?
Q. Which of the following is not a keyword in Python?
Q. A graphical representation that shows step by step solution to solve a given problem is ____________
Q. Number of elif in if-elif ladder depends on ____
Q. To write else statement in if-elif ladder is mandatory? (T/F)
Q. What is the purpose of ‘else’ statement in if-elif ladder?
Q. if-elif statement is used in situation which involves ____________
Q. Ram wants to create a program to check whether an year is leap year or not. For this he should have a good understanding of ____________
Q. Ravi wants to display “Hello”, if the condition is True, otherwise, “Pass” if the condition is False. Which of the following help to implement the same?
Q. A statement inside ‘if’ has an indentation of _________ spaces.
Q. Which of the following statement is not assigning a numerical value 8 to variable X, if original value of X is 0? ?
Q. ____ is an empty statement in Python.
Q. Leading whitespace (spaces and tabs) at the beginning of a statement is called _________________.
Q. An ‘if’ condition inside another ‘if’ is called
Q. Number of elif in a program is dependent on the ___________
Q. Which of the following is variant of conditional statement in Python?
Q. ______ statements can be written in if block.
Q. Correct syntax of writing ‘simple if’ statement is _____
Q. Execution of statements in _________________ construct depend on a condition test.
Q. In programming, the concept of decision making or selection is implemented with the help of ___________ statement
Q. Which of the following are control structure in python?
Q. Python supports _____________ types of control structures.
Q. The order of execution of the statements in a program is known as
Q. Python executes one statement after another from beginning to the end of the program. This is a
Q. What will be the output of the following code snippet?
Q. Which of the following is not true about structs in C?
Q. Which data structure is used to handle recursion in C?
Q. Which of the following should be used to free memory from a pointer allocated using the “new” operator?
Q. Which of the following will occur if we call the free() function on a NULL pointer?
Q. What is the output of the following code snippet?
Q. Which of the following is not a storage class specifier in C?
Q. How to find the length of an array in C?
Q. What is the return type of the fopen() function in C?
Q. Which of the following are correct file opening modes in C?
Q. Which of the following function is used to open a file in C++?
Q. In which of the following languages is function overloading not possible?
Q. What will be the result of the following code snippet?
Q. Which of the following are not standard header files in C?
Q. If p is an integer pointer with a value 1000, then what will the value of p + 5 be?
Q. How to declare a double-pointer in C?
Q. What is the size of the int data type (in bytes) in C?
Q. Which of the following is an exit controlled loop?
Q. Which of the following is the proper syntax for declaring macros in C?
Q. What does the following declaration indicate?
Q. What will be the value of x in the following code snippet?
Q. What is the disadvantage of arrays in C?
Q. How are String represented in memory in C?
Q. How is the 3rd element in an array accessed based on pointer notation?
Q. How is an array initialized in C language?
Q. What is the range of values that can be stored by int datatype in C?
Q. If a condition is true the not operator is used to reverse the logical state?
Q. Find the invalid variable among the following
Q. Predict the output
Q. values = [[3, 4, 5, 1], [33, 6, 1, 2]] v = values[0][0] for lst in values: for element in lst: if v > element: v = element print(v)
Q. Character data type cannot store following value.
Q. Which of the following data types comes under floating data types ?
Q. Integer Data type does not include following primitive data type
Q. Which of the following is not a primitive data type ?
Q. Which of the following is smallest integer data type ?
Q. Default value of variable having boolean data type is
Q. Short data type has a minimum value of
Q. Which of the following data type(s) can store 64 bit Value.
Q. What is size of integer in Java Programming
Q. Range of Byte Data Type is _________
Q. An expression involving byte, int, and literal numbers is promoted to which of these?
Q. What is the range of short data type in Java?
Q. Which of these can be returned by the operator &?
Q. Select from among the following character escape code which is not available in Java.
Q. The && and || operators
Q. Decrement operator, −−, decreases the value of variable by what number?
Q. Which will legally declare,construct, and initlaize an array?
Q. When you pass an array to a method, the method recieve
Q. In java array object are
Q. Which of these is necessary to specify at time of array initialization?
Q. How to sort an array?
Q. Which of these is an incorrect Statement?
Q. An array elements are always stored in ________ memory locations?
Q. Where is array stored in memory?
Q. Generics does not work with?
Q. Which function of pre defined class Thread is used to check weather current thread being checked is still running?
Q. Which of the following will directly stop the execution of a Thread?
Q. Which cannot directly cause a thread to stop executing?
Q. What is the name of the method used to start a thread execution?
Q. Consider the following code snippet. What does this code result?
Q. What are the three important manipulations done in a for loop on a loop variable?
Q. What will the following code snippet work? If not, what will be the error?
Q. One of the special feature of an interpreter in reference with the for loop is that
Q. What will happen if the body of a for/in loop deletes a property that has not yet been enumerated?
Q. What will be the step of the interpreter in a jump statement when an exception is thrown?
Q. Consider the following code snippet. What will be the role of the continue keyword in the above code snippet?
Q. Consider the following code snippet. What could be the task of the statement debugger?
Q. Among the keywords below, which one is not a statement?
Q. Consider the following code snippet. The code is equivalent to which code?
Q. The number of files that each end of a client/server connection including SSL support use to set up secure communications is __________.
Q. What is the TLS protocol?
Q. Which grant table scope columns is case insensitive?
Q. The variable that checks for availability of SSL support is ____________.
Q. MySQL does provides a date type that has an optional time part.
Q. ‘fetchrow_hashref()’ returns reference to hash of row values keyed by what?
Q. The function that returns a reference to an array of row values is
Q. The MySQL server is configurable
Q. Multiple MySQL servers cannot be run on the same machine.
Q. The log in which data changes received from a replication master server are written is _____________.
Q. Which library file contains various portability macros and definitions?
Q. Which header should be included first?
Q. mysql_init() returns a _____________.
Q. When linking to a static MySQL C client library, the client library and the client application must use the same compiler option.
Q. Which of these can be used in place of MYSQL_SERVER_VERSION?
Q. Which of the following can be used interchangeably with MYSQL_VERSION_ID?
Q. Which option is supplied to ensure TCP/IP connection to local server?
Q. Connections to remote servers always use TCP/IP.
Q. The –protocol value ‘TCP’ runs on which operating systems?
Q. The ‘SOCKET’ protocol is permitted on which operating systems?
Q. How many files does each end of a client/server connection including SSL support use to set up secure communications?
Q. The TLS protocol is _____________.
Q. The grant table scope columns that is case insensitive is _____________.
Q. Which variable checks for availability of SSL support?
Q. MySQL does not provide a date type that has an optional time part.
Q. What is the best datatype for a column that is expected to store values up to 2 million?
Q. The datatype that stores the longest length of strings is ______________.
Q. The security context when a user creates a stored program that accesses sensitive data but forgets that other people who can invoke the object have the same access is __________
Q. Triggers and events are not invoked automatically by the server.
Q. A stored procedure is invoked using the statement __________.
Q. What is the output of the following program?
Q. Which of the following automatic type conversion will be possible?
Q. Automatic type conversion in Java takes place when
Q. Annotations which are applied to other annotations are called meta annotations.
Q. Which one of the following annotations is not used in Hibernate?
Q. Which one of the following is not ID generating strategy using @GeneratedValue annotation?
Q. Which one of the following is not an annotation used by Junit with Junit4?
Q. Using which annotation non visible or private method can be tested?
Q. Determine output:
Q. Size of float and double in Java is
Q. Which of the following annotation is used to avoid execution of Junits?
Q. Which is the Parent class of annotation class?
Q. The smallest integer type is ......... and its size is ......... bits.
Q. Size of int in Java is
Q. Which of the following is not a maven goal?
Q. In Java byte, short, int and long all of these are
Q. How many primitive data types are there in Java?
Q. Java is a ........... language.
Q. Which file is used to define dependency in maven?
Q. Which file is used to specify the packaging cycle?
Q. Which environment variable is used to specify the path to maven?
Q. Which of the below is a source code management tool?
Q. Can we run Junits as a part of Jenkins job?
Q. Which command can be used to check maven version?
Q. Which of the following is not true for Ant?
Q. Which maven plugin creates the project structure?
Q. JVM stands for ____
Q. Identify the incorrect statement?
Q. What is the lastest version of Java?