Home / Priyanka Tomar / Programming MCQs Solution
Programming Portal Solution
You will find all Programming Portal MCQs whose solution is updated by Priyanka Tomar
Q. Which of these statements is incorrect?
Q. In Java, can a subclass inherit private constructors from its superclass?
Q. Using which of the following, multiple inheritance in Java can be implemented?
Q. Which of these class can generate pseudorandom numbers?
Q. Which of these class have only one field?
Q. Which of these methods loads the specified dynamic library?
Q. What is the purpose of the "final" keyword in Java?
Q. Which of this package is used for analyzing code during run-time?
Q. Which of these keywords is used to define interfaces in Java?
Q. Which of the following is method of wrapper Integer for converting the value of an object into int?
Q. Which of these method of FileReader class is used to read characters from a file?
Q. Which of these is a super class of Character wrapper?
Q. Which of these methods return string equivalent of Boolean object?
Q. What is the purpose of the "@Override" annotation in Java?
Q. What is the purpose of the "super" keyword in method overriding?
Q. What is the purpose of the "super" keyword in method overloading?
Q. Which of this keyword can be used in a subclass to call the constructor of superclass?
Q. Which statement is true about java?
Q. Which component is responsible for converting bytecode into machine specific code?
Q. Which of the following has the highest memory requirement?
Q. What is true about protected constructor?
Q. Which method can be defined only once in a program?
Q. Which of these is not a correct statement?
Q. Which operator is used for exponentiation in Java?
Q. What is the result of the expression 4 * 2 + 3 in Java?
Q. What is the value of the expression 8 < 6 ? 4 : 2 in Java?
Q. Which of the following is not a decision making statement?
Q. Which of the following is not a valid flow control statement?
Q. What is the output of relational operators?
Q. Which of the following methods is used to compare two strings for equality in Java?
Q. Which of these method of class String is used to remove leading and trailing whitespaces?
Q. What happens if you try to access an array element at an index that is out of bounds in Java?
Q. Which of these is an incorrect array declaration?
Q. Which keyword is used to define a superclass's method that is overridden by a subclass method?
Q. In Java, what is the purpose of the final keyword when applied to a method?
Q. The smallest integer type is ......... and its size is ......... bits.
Q. What will be the output of the following MySQL command? SELECT * FROM person WHERE emp_id IS NULL;
Q. Which of these values is not valid as an AUTO_INCREMENT value?
Q. REGEXP does not take collation into account.
Q. What does a fully qualified table name consist of?
Q. To create a database only if it doesn't already exist, which clause is used?
Q. Which language is the core for APIs and communication in MySQL?
Q. What is the datatype for single precision floating point number?
Q. Stored programs improve database security.
Q. The maximum size in bytes of a row in MySQL is . . . . . . . .
Q. The SQL mode to check for divide by zero error is . . . . . . . .
Q. To convert a string to an int, the function is . . . . . . . .
Q. Which mode tells the server to recognize double quote as an identifier quoting character?
Q. Which of these is defined to execute when the table is modified only?
Q. The datatype for single precision floating point number is . . . . . . . .
Q. Which of the following table exist in Mysql?
Q. The ALL subquery performs which operation?
Q. To perform analysis of key values by the server, the statement used is . . . . . . . .
Q. Which is the header that should be included first?
Q. Loading is faster when a table has no indexes than when it is indexed.
Q. The function 'fetchrow_hashref()' returns reference to hash of row values keyed by . . . . . . . .
Q. In UNIX, the name of the option file is . . . . . . . .
Q. How many values can be returned from a stored procedure?
Q. CGI.pm does not support an object oriented style of use.
Q. What is the mantissa in -1.58E5?
Q. The numbers that are prefixed with '0x' are in base . . . . . . . .
Q. Which of these is a read only variable?
Q. What is def in the following MySQL statement? DECLARE abc HANDLER FOR def ghi;
Q. Which program reads the statement from a binary log?
Q. What will be the storage pattern for "float(4,2)" in Mysql?
Q. The line that is not used to turn on the event scheduler is . . . . . . . .
Q. The IN, OUT and INOUT keywords do not apply to stored functions.
Q. Suppose run_me.sh is a script file. Which command is used to make it executable?
Q. Which command is used for taking "server side help" in Mysql command line tool?
Q. If you want to insert some slides from other presentation into current one choose
Q. Which of the following statement is true?
Q. In a table to insert User\'s Voice, Data field should be
Q. What is the purpose of NiFi's "Site-to-Site" protocol?
Q. What is the purpose of NiFi's "Remote Process Group"?
Q. How can you secure the communication between a Hadoop client and the ResourceManager?
Q. What is the purpose of Hadoop's HDFS Trash feature in a security context?
Q. How does Hadoop support encryption in transit for data transmitted between nodes in a cluster?
Q. Point out the correct statement.
Q. Spark was initially started by . . . . . . . . at UC Berkeley AMPLab in 2009.
Q. Spark is packaged with higher level libraries, including support for . . . . . . . . queries.
Q. Point out the correct statement.
Q. . . . . . . . . method is used to include a projection schema, to specify the output fields.
Q. What is the primary role of the HBase REST API in HBase?
Q. What is the purpose of the HBase Tiered Storage feature?
Q. What is the primary function of the HBase Load Balancer?
Q. What is the role of the HBase Region Locator in HBase architecture?
Q. In HBase, what is the purpose of the HBase Multi-Table feature?
Q. What is the significance of the Oozie Fork and Join nodes in a workflow?
Q. Which of the following are a collaborative data analytics and visualization tool?
Q. . . . . . . . . is a software distribution framework based on OSGi.
Q. Apache Knox accesses Hadoop Cluster over . . . . . . . .
Q. The easiest way to have an HDP cluster is to download the . . . . . . . .
Q. The items stored on . . . . . . . . are organized in a hierarchy of widget category.
Q. Point out the correct statement.
Q. . . . . . . . . forge software for the development of software projects.
Q. In Hive, what is the purpose of the DISTRIBUTE BY clause in a SELECT statement?
Q. Which of the following is a command line option?
Q. What is the primary function of the Hadoop RecordWriter?
Q. Thrift resolves possible conflicts through . . . . . . . . of the field.
Q. What is the significance of the FOREACH statement in Apache Pig?
Q. $ pig -x tez_local ... will enable . . . . . . . . mode in Pig.
Q. Which of the following is the default mode?
Q. Point out the correct statement.
Q. Which of the following has methods to deal with metadata?
Q. Which of the following script is used to check scripts that have failed jobs?
Q. What is the primary function of the Hadoop NodeManager in the YARN architecture?
Q. In Sqoop, what is the significance of the "--compression-codec" option in an import command?
Q. . . . . . . . . is used to decommission more than one RegionServer at a time by creating sub-znodes.
Q. BigDecimal is comprised of a . . . . . . . . with an integer 'scale' field.
Q. The Mapper implementation processes one line at a time via . . . . . . . . method.
Q. What does the term "InputFormat" represent in MapReduce?
Q. The output of the . . . . . . . . is not sorted in the Mapreduce framework for Hadoop.
Q. Which of the following class is provided by the Aggregate package?
Q. What does Hadoop MapReduce provide in terms of data processing?
Q. Which of the following method is used to get user-specified job name?
Q. An input . . . . . . . . is a chunk of the input that is processed by a single map.
Q. . . . . . . . . class allows you to specify the InputFormat and Mapper to use on a per-path basis.
Q. . . . . . . . . method is used to reverse the values.
Q. What will be the value of num after the following Visual Basic code is executed?
Q. . . . . . . . . are operations that the object is capable of performing.
Q. . . . . . . . . can be used to advance the insertion point in a file or on the printer.
Q. . . . . . . . . refers to the process of locating and correcting errors.
Q. What will be in Msg after the following code is evaluated?
Q. The items in a combo box belong to which collection?
Q. Designers generally avoid using . . . . . . . . and . . . . . . . . in an interface.
Q. The procedure associated with the KeyPress event has . . . . . . . . parameters.
Q. A . . . . . . . . cannot change its value while the application is running.
Q. The text of many controls contain an underlined letter known as . . . . . . . .
Q. In vb . . . . . . . . is the extension to represent project file.
Q. The . . . . . . . . symbol is called the start /stop symbol in the flowchart.
Q. The list of items displayed by menu title are known as . . . . . . . .
Q. What value is stored in the count variable when the loop ends?
Q. . . . . . . . . property removes the title bar elements.
Q. In . . . . . . . . if condition we can check more then one condition .
Q. What value is stored in the intCount variable when the loop ends?
Q. What determines the Tab order?
Q. The code in an application can be broken into logical component by . . . . . . . . process
Q. The data type of the value assigned should be same as . . . . . . . .
Q. The . . . . . . . . include all widow property, form, project ,form layout .
Q. Writing data to a file is referred to as . . . . . . . .
Q. The . . . . . . . . in a two-dimensional array specifies the elements row and column position.
Q. What is the result of the expression 5 %% 2 in R?
Q. What does the next statement do in R?
Q. What is the mode of 'a' in the following R code? a <- c(1,” a”, FALSE)
Q. Which technology do we mix our business logic with the presentation logic?
Q. Which object of HttpSession can be used to view and manipulate information about a session?
Q. Which of these variables stores the number of hits that are successfully served out of cache?
Q. A JSP page consists of which tags?
Q. Which command is used to display the version of the Linux kernel?
Q. Which command is used to display the manual for a specific command?
Q. Which command is used to compress a file in 'tar' format?
Q. Which of the following commands is used to set the system's date and time in Linux?
Q. Which command is used to display information about the system's disk partitions?
Q. What does the 'ls -l' command do in Linux?
Q. Which command is used to monitor system performance in real-time?
Q. What does the 'grep' command do in Linux?
Q. Which Linux command is used to display system uptime?
Q. Which Linux command is used to shut down the system?
Q. Which command is used to change file permissions in Linux?
Q. Which command is used to display the current working directory?
Q. Which header file is required to use file handling in C++?
Q. What will be the output of the following code? int x = 5; cout << (x << 1);
Q. Which operator is used to get the address of a variable in C++?
Q. Which C++ feature allows a derived class to inherit members from a base class?
Q. What is the output of the following code snippet? int x = 10; int y = 20; cout << (x <= y ? x : y);
Q. What is the output of the following code snippet? int x = 10; int y = 20; cout << (x != y ? x : y);
Q. What will be the output of the following code? int a = 5; int b = 2; cout << a / b;
Q. Which of the following is the correct syntax to include a C++ library?
Q. Which of the following C++ keywords is used to declare a constant?
Q. Which of the following is the correct syntax to open a file in C++?
Q. Which of the following is the correct way to define a constructor with parameters in C++?
Q. What is the output of the following code snippet? int x = 10; int y = 20; cout << (x >= y);
Q. Which of the following is the correct way to define a class template in C++?
Q. What is the output of the following code snippet? int x = 10; int y = 20; cout << (!x);
Q. What is the output of the following code snippet? int x = 10; int y = 20; cout << (x >> 1);
Q. What is the output of the following code snippet? int x = 10; int y = 20; cout << (x * y);
Q. Which of the following is the correct way to define a virtual function in C++?
Q. Which of the following is the correct way to define a friend function in C++?
Q. What is the output of the following code snippet? int a = 10; int b = 20; cout << (a > b ? a : b);
Q. Which of the following is used to terminate a loop in C++?
Q. Which of the following is the correct way to define a constant pointer in C++?
Q. What is the purpose of the 'main' function in C++?
Q. Which of the following is the correct way to create a set in Python?
Q. Which method is used to add an element to the end of a list in Python?
Q. What does the 'docker commit' command do?
Q. What is the purpose of the 'docker-compose config --no-interpolate' command?
Q. Which command is used to view the Docker container's environment variables?
Q. Which of the following Docker commands is used to restart a container?
Q. Which of the following commands is used to remove all stopped containers?
Q. Which Docker command is used to update the Docker engine?
Q. Which command is used to start a container in the background?
Q. Which of the following commands will remove a Docker image?
Q. Which file is used by Docker Compose to configure and manage multi-container applications?
Q. Which command is used to view the Docker system-wide information?
Q. What is the purpose of the 'docker-compose config' command?
Q. Which command is used to remove a running container?
Q. What is the role of the Docker daemon?
Q. Which command is used to list all Docker volumes?
Q. Which Docker command is used to stop a container?
Q. What does the '--rm' flag do when running a Docker container?
Q. Which command is used to pull an image from Docker Hub?
Q. Which command is used to build a Docker image from a Dockerfile?
Q. What is the purpose of the 'build' section in a Docker Compose file?
Q. What is the purpose of 'depends_on' in a Docker Compose file?
Q. What is the purpose of the SHELL instruction in a Dockerfile?
Q. What does the 'docker run' command do?
Q. A block comment can be written by
Q. Identify the valid integer from the following:
Q. OOPs follows ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ approach during program design.
Q. In OOP which cocept provides the idea of reusability.
Q. ‐‐‐‐‐‐ refers to the use of the same thing for different purpose.
Q. The qualifier ‐‐‐‐‐‐ tells the compiler that the function should not modify the argument.
Q. Which of the following is an exit controlled loop?
Q. Which of the following statements are true in c++?
Q. Observe following function declaration and choose the best Ans:: int divide ( int a, int b = 2 )
Q. How many times is a do while loop guaranteed to loop?
Q. Find out the error in following block of code. If (x = 100) Cout << “x is 100”;
Q. Which one of the following is the correct operator to compare two values
Q. _________ used to make a copy of one class object from another class object of the same class type.
Q. Which of the following statement is correct?
Q. Which of the following statements is correct?
Q. Which of the following statements is incorrect?
Q. The function contain in the ios class to specify number of decimal places
Q. Which function is in the ostream class
Q. The class that derived from standard library ios contain output functions
Q. The memory management operator in c++
Q. The variable that contains the address of constant or variable
Q. The mechanism of giving special meaning to an operator
Q. Which among the following best defines abstraction?
Q. In which tcp_wrappers file can you specify to allow all connections from all hosts?
Q. How do you direct the shell to execute a command in the background?
Q. What does the permission string rwxr-xr-- correspond with in octal?
Q. What is the following syntax used for? command >file1 2>file2
Q. How would you display running httpd processes?
Q. What command is used to assign executable permission to the owner of the file named "letter"?
Q. What command is used to print a file?
Q. What command is used to display the top of the file?
Q. Which character is used to match exactly one character?
Q. The head command writes the first ____________ lines of a file to screen by default.
Q. "cat" is the command used to
Q. Which is the commmand used to remove or delete file with out confirmation msg ?
Q. How would you lock the user account named csm099?
Q. The layout manager that lays out a container's components in a rectangular grid.
Q. What is different between a Java applet and a Java application?
Q. What happens when delete is used for a NULL pointer? int *ptr = NULL; delete ptr;
Q. Implicit return type of a class constructor is:
Q. Amazon Web Services (AWS) is an example of
Q. In distributed systems, link and site failure is detected by
Q. enables the migration of the virtual image from one physical machine to another.
Q. as a utility is a dream that dates from the beginning of the computing industry itself.
Q. In intel’s IA-32 architecture there is a separate 16 bit address space for the I/O devices.
Q. AMIs are operating systems running on the virtualization hypervisor.
Q. Cloud computing is a system and it is necessarily unidirectional in nature.
Q. The is something that you can obtain under contract from your vendor.
Q. An application that needed storage alone might not benefit from a cloud deployment at all.
Q. How many categories of storage devices broadly exist in cloud?
Q. Which of the following system does not provision storage to most users?
Q. A service provider reselling a may have the option to offer one module to customize the information.
Q. An operating system running on a Type VM is full virtualization.
Q. In a ____________ scheme, the VM is installed as a Type 1 Hypervisor directly onto the hardware.
Q. AMI(Amazon Machine Image) imaging service is provided by Amazon for ______________
Q. Amazon’s Elastic Compute Cloud (EC2) is a well known ______.