Home / Ram Avtar Sharma / Programming MCQs Solution

Programming Portal Solution

You will find all Programming Portal MCQs whose solution is updated by Ram Avtar Sharma

Q. What is the purpose of the "throws" keyword in Java method declaration?

Q. What is an exception in Java?

Q. In Java, can a "finally" block have a "return" statement?

Q. Which of these is a super class of all exceptional type classes?

Q. What will be the output of the following Java code?

Q. Which exception is thrown when divide by zero statement executes?

Q. What will be the output of the following Java code? class exception_handling { public static void main(String args[]) { try { throw new NullPointerException ("Hello"); System.out.print("A"); } catch(ArithmeticExcep

Q. What is the result of the following code snippet? class Parent { void display() { System.out.println("Parent"); } } class Child extends Parent { void display() { System.out.println("Child"); } } public class Main { public static void main(String[] args) { Parent obj = new Child(

Q. What is a superclass in Java?

Q. What is the result of the following code snippet? class Parent { void display() { System.out.println("Parent"); } } class Child extends Parent { void display() { super.display(); System.out.println("Child"); } } public class Main { public static void main(String[] args) { Child

Q. What is the result of compiling and running the following code? class Base{ public Base(){ System.out.print("Base"); } } public class Derived extends Base{ public Derived(){ this("Examveda"); System.out.print

Q. What will be the output of the following Java program? abstract class A { int i; abstract void display(); } class B extends A { int j; void display() { System.out.println(j); } } class Abstract_demo { public static void main(String args[]) {

Q. All classes in Java are inherited from which class?

Q. Static members are not inherited to subclass.

Q. What will be the output of the following Java program? class A { public int i; public int j; A() { i = 1; j = 2; } } class B extends A { int a; B() { super(); } } class super_use { public static void main(String args[]) {

Q. Which of the following is used for implementing inheritance through an interface?

Q. What will be the output of the following Java program? (Note: file is made in c drive.) import java.io.*; class files { public static void main(String args[]) { File obj = new File("/java/system"); System.out.print(obj.getParent()); System.out.print("

Q. Which of these methods initiates garbage collection?

Q. Which of the following exceptions is thrown by every method of Runtime class?

Q. What will be the output of the following Java program? public class BoxDemo { public static <U> void addBox(U u, java.util.List<Box<U>> boxes) { Box<U> box = new Box<>(); box.set(u); boxes.add(box); } public static <U> v

Q. What is the purpose of the "extends" keyword in Java?

Q. What will be the output of the following Java program? import java.io.*; class Chararrayinput { public static void main(String[] args) { String obj = "abcdef"; int length = obj.length(); char c[] = new char[length]; obj.getChars(0,length,c,0); C

Q. Which of these class encapsulate the runtime state of an object or an interface?

Q. Which of the following is not a segment of memory in java?

Q. Which of the following is an incorrect statement regarding the use of generics and parameterized types in Java?

Q. Which of these packages contain all the Java's built in exceptions?

Q. Which environment variable is used to set java path?

Q. Which of the following is the correct way of implementing an interface A by class B?

Q. Math.random() guarantees uniqueness?

Q. In Java, what is the return type of a method that does not return any value?

Q. In method overloading, can methods have the same name and the same parameter types if their access modifiers are different?

Q. What happens when a subclass tries to override a static method from the superclass in Java?

Q. Which of these keywords can be used to prevent Method overriding?

Q. What does the "void" keyword indicate in a method declaration?

Q. What is the purpose of method parameters in Java?

Q. What is method hiding in Java?

Q. What is the expected output? class Animal { Animal() { System.out.println("Animal"); } } class Wild extends Animal{ Wild() { System.out.println("Wild"); super(); } } public class Test { public static void main(String args[]) { Wild wild = new Wild(); } }

Q. What is Math.floor(3.6)?

Q. Which of these statement is incorrect?

Q. What is use of interpreter?

Q. What is -Xms and -Xmx while starting jvm?

Q. What will be the output of the following Java program? class area { int width; int length; int volume; area() { width=5; length=6; } void volume() { volume = width*length*height; } } class cons_method { public static void main(S

Q. What is the result of the expression 1 << 3 in Java?

Q. What will be the output?

Q. Which of these statements are incorrect?

Q. What will be the output of the following Java code?

Q. Which method is used to extract a substring from a string in Java?

Q. What will be the output of the following Java program? class output { public static void main(String args[]) { String c = " Hello World "; String s = c.trim(); System.out.println("\""+s+"\""); } }

Q. What will be the output of the following Java code? class output { public static void main(String args[]) { StringBuffer s1 = new StringBuffer("Hello World"); s1.insert(6 , "Good "); System.out.println(s1); } }

Q. In Java, how do you find the maximum element in an array?

Q. Which method is used to add an element to the end of an ArrayList in Java?

Q. Which of these is necessary to specify at time of array initialization?

Q. What will be the output of the following Java code? class array_output { public static void main(String args[]) { char array_variable [] = new char[10]; for (int i = 0; i < 10; ++i) { array_variable[i] = 'i'; System.out.print(array_va

Q. In Java, what access modifier is used to specify that a class member can be accessed only within its class?

Q. What keyword is used to declare a method that can be called without creating an instance of the class?

Q. Which of the following is not a primitive data type in Java?

Q. What will be output of following program? public class Test{ public static void main(String[] args){ byte b=127; b++; b++; System.out.println(b); } }

Q. Which method returns the elements of Enum class?

Q. What is the replacement of joda time library in java 8?

Q. What will be the output of the following Java code? class area { public static void main(String args[]) { double r, pi, a; r = 9.8; pi = 3.14; a = pi * r * r; System.out.println(a); } }

Q. Which of these occupy first 0 to 127 in Unicode character set used for characters in Java?

Q. How to identify if a timezone is eligible for DayLight Saving?

Q. What will be the output of the following Java code snippet? enum Enums { A, B, C; private Enums() { System.out.println(10); } } public class MainClass { public static void main(String[] args) { Enum en = Enums.B; } }

Q. Which of these is not an exact numeric type?

Q. Which feature is used for the automatic increment of the column?

Q. The value of recently generated sequence number can be obtained by . . . . . . . .

Q. Which statement exits a labeled flow-control construct?

Q. What does mysql_query() return on failure?

Q. The server sets its default time zone by examining its environment.

Q. Which Clause is used to select a particular table in Mysql?

Q. The variable that returns code from operations that return true or false is . . . . . . . .

Q. Which of the following statements is/are correct?

Q. There is a startup penalty for a standalone interpreter.

Q. INT3 maps to MySQL type . . . . . . . .

Q. The event scheduler does not run by default.

Q. Foreign keys cannot handle deletes and updates.

Q. MySQL Enterprise Backup records details of each backup in . . . . . . . .

Q. Without LOCAL, LOAD DATA is . . . . . . . .

Q. If $a represents an array with numeric indices in PHP, the first element accessed by . . . . . . . .

Q. The MySQL server is poorly configurable.

Q. The 'LAST_INSERT_ID()' is tied only to the 'AUTO_INCREMENT' values generated during the current connection to the server.

Q. How is a stored procedure invoked?

Q. The protocol CGI is . . . . . . . .

Q. MySQL works with spatial values in 3 formats.

Q. What loads data files into tables?

Q. The system variable to maintain InnoDB log buffer size is . . . . . . . .

Q. What is the facility that allows nesting one select statement into another?

Q. If a column is expected to store values up to 2 million, the best datatype for it is . . . . . . . .

Q. Which option is used in 'mysqldump' to make all tables in the destination databases to use a different storage engine?

Q. The argument to the function mysql_error() is . . . . . . . .

Q. To determine whether query cache is supported by the server the variable is . . . . . . . .

Q. To reload a delimited text data file use . . . . . . . .

Q. REPAIR TABLE does not work for . . . . . . . .

Q. If ANSI_QUOTES is enabled, MySQL treats the double quotes as . . . . . . . .

Q. For a table having 4 columns, the number of columns to which hash function is applied when using hash indexes is . . . . . . . .

Q. Consider a database name "db_name" whose attributes are intern_id (primary key), subject, subject_value. Intern_id = {1, 2, 3, 4, 5, 6} Subject = {sql, oop, sql, oop, c, c++} Subject_value = {0, 0, 1, 1, 2, 2, 3, 3} If these are one to one relation then what will be the output of the follo

Q. What is SBR replication?

Q. REGEXP takes collation into account.

Q. Which among the following are the correct representation of "float(4,2)"?

Q. mysql_fetch_row() returns . . . . . . . .

Q. The bit-field values are prefixed with . . . . . . . .

Q. The search mode that uses natural language search as a subroutine is . . . . . . . .

Q. The date and time datatype that stores time value in 'hh:mm:ss' format is . . . . . . . .

Q. Which of the following is an illegal unquoted identifier name?

Q. Which status indicator assesses how effective the table cache is?

Q. What is a synonym for CHARACTER SET?

Q. The Perl DBI is . . . . . . . .

Q. DBI scripts are located in the directory . . . . . . . .

Q. Which type of database management system is MySQL?

Q. The functions in Perl DBI called?

Q. In the following SQL code, InnoDB is . . . . . . . . CREATE TABLE student ( name CHAR(30), student_id INT, PRIMARY KEY (student_id) ) ENGINE = InnoDB;

Q. The hub of a MySQL installation is . . . . . . . .

Q. What is the use of "VIEW" in Mysql?

Q. Which privilege must be given to the database to create a stored function or procedure?

Q. The maximum number of elements allowed in SET() is . . . . . . . .

Q. Which of the following functions are not performed by "ALTER" clause?

Q. Microsoft Office Document Scanning is

Q. A personal information manager and e-mail communication software in MS Office is

Q. Microsoft Office Suite spreadsheet program is

Q. What is the primary role of NiFi's "Processor Group"?

Q. In NiFi, what does the term "Back Pressure" refer to in the context of data flow?

Q. What does the term "SSLContextService" represent in the context of NiFi's security configuration?

Q. What does the term "NiFi Provenance" refer to in Apache NiFi?

Q. What is the purpose of Hadoop's Ranger in the context of security?

Q. What is the significance of Hadoop's Authentication Proxy in a secure Hadoop environment?

Q. How does Hadoop's Ranger KMS (Key Management Service) contribute to securing encryption keys?

Q. Which of the following is a more compact binary format?

Q. Point out the wrong statement.

Q. . . . . . . . . is a technology suitable for nearly any application that requires full-text search, especially cross-platform.

Q. . . . . . . . . does not restrict contributions to Hadoop based implementations.

Q. Which of the following Uses JSON for encoding of data?

Q. HCatalog is built on top of the Hive metastore and incorporates Hive's is . . . . . . . .

Q. Apache Hama provides complete clone of . . . . . . . .

Q. Drill provides a . . . . . . . . like internal data model to represent and process data.

Q. The . . . . . . . . class allows developers to exercise precise control over how data is partitioned, sorted, and grouped by the underlying execution engine.

Q. What is HBase in the context of Hadoop?

Q. What is the primary role of the HBase Compaction Policy?

Q. What is the primary role of the Oozie Action Executor?

Q. In Oozie, what is the primary purpose of a coordinator?

Q. In Oozie, what is the function of the "sla:info" property in a workflow action?

Q. A fully secure Hadoop cluster needs . . . . . . . .

Q. . . . . . . . . is a Java library for writing, testing, and running pipelines of MapReduce jobs on Apache Hadoop.

Q. Knox provides perimeter . . . . . . . . for Hadoop clusters.

Q. A . . . . . . . . is a hosted, live, concurrent data structure for rich communication.

Q. . . . . . . . . is a columnar storage format for Hadoop.

Q. In Hive, what is the purpose of the GROUP BY statement?

Q. What is the purpose of the Hive TRANSACTIONAL keyword in a CREATE TABLE statement?

Q. What is the significance of the Hadoop OutputFormat?

Q. The . . . . . . . . is a directory that contains two SequenceFile.

Q. Point out the correct statement.

Q. Point out the wrong statement.

Q. In Pig, what does the term "Bag" refer to?

Q. In Pig, what is the role of the SPLIT statement?

Q. What is the primary function of the Pig Latin RANK() function?

Q. Which of the following is shortcut for DUMP operator?

Q. . . . . . . . . Manager's Service feature monitors dozens of service health and performance metrics about the services and role instances running on your cluster.

Q. . . . . . . . . is a standard Java API for monitoring and managing applications.

Q. HDFS supports the . . . . . . . . command to fetch Delegation Token and store it in a file on the local system.

Q. Point out the wrong statement.

Q. What is the role of the Flume Interceptor in the Flume architecture?

Q. In Flume, what is the function of a Flume Source?

Q. What is the primary role of the Flume Sink Processor in Flume?

Q. What is the significance of the Flume Source Selector in Flume?

Q. Which of the guarantee is provided by Zookeeper?

Q. . . . . . . . . is one of many possible IAuthorizer implementations and the one that stores permissions in the system_auth.permissions table to support all authorization-related CQL statements.

Q. The underlying client-server protocol has changed in version . . . . . . . . of ZooKeeper.

Q. Sqoop has been tested with Oracle . . . . . . . . Express Edition.

Q. What does the term "InputFormat" represent in the context of a MapReduce job?

Q. The . . . . . . . . can also be used to distribute both jars and native libraries for use in the map and/or reduce tasks.

Q. . . . . . . . . specifies the number of segments on disk to be merged at the same time.

Q. . . . . . . . . is the main configuration file of HBase.

Q. During the execution of a streaming job, the names of the . . . . . . . . parameters are transformed.

Q. In Hadoop, what does the term "JobTracker" refer to?

Q. . . . . . . . . is a framework for performing remote procedure calls and data serialization.

Q. Hive also support custom extensions written in . . . . . . . .

Q. What does the Shuffle phase in MapReduce involve?

Q. Point out the correct statement.

Q. To set an environment variable in a streaming command use . . . . . . . .

Q. Which Hadoop component is responsible for task coordination and scheduling?

Q. What is the function of the Hadoop ResourceManager?

Q. What is the purpose of the Hadoop JobTracker in MapReduce?

Q. In Hadoop, what is the purpose of the DataNode?

Q. What is the primary function of the Hadoop MapReduce "Map-side Aggregation" technique?

Q. . . . . . . . . is the output produced by TextOutputFor mat, Hadoop default OutputFormat.

Q. Point out the correct statement.

Q. When you delete a groupbox the controls inside it are . . . . . . . .

Q. . . . . . . . . must be the last clause in the Select Case statement.

Q. Errors are called as . . . . . . . . in a program.

Q. The . . . . . . . . box is the standard control for accepting input from the user as well as to display the output.......

Q. . . . . . . . . Executes the timer events at specified intervals of time

Q. . . . . . . . . can be used instead of a Structure statement.

Q. The . . . . . . . . is used to code both pretest and posttest loops.

Q. A . . . . . . . . web page is not interactive and is used to display information only.

Q. A form's . . . . . . . . determines the border style of the form.

Q. While printing, the . . . . . . . . need to be active.

Q. You can use . . . . . . . . to override the order of precedence.

Q. How many default buttons can a form have?

Q. The . . . . . . . . keyword is necessary only in a dual-alternative selection structure.

Q. The extension of class module is . . . . . . . .

Q. Objects are . . . . . . . . from a class.

Q. . . . . . . . . uses standardized symbols to describe the steps of a procedure.

Q. The name of the button control is changed using . . . . . . . .

Q. What output will be returned if the following Visual Basic code is executed?

Q. When you group together related variables, the group is referred to as . . . . . . . .

Q. The position of an item in a list box depends on which of the following property of the value stored in the list box's?

Q. The number of choices the user can select is controlled by the list box's . . . . . . . .

Q. A timer control is instantiated using . . . . . . . .

Q. Which of the following statements assigns (to the intElements variable) the number of elements contained in the intNums array?

Q. . . . . . . . . means adding a number to the value stored in the accumulator or counter.

Q. A . . . . . . . . allows you to select from a list of choices.

Q. By which button you can display the additional items?

Q. The number that appears after the period in the . . . . . . . . value indicates the order in which the controls were added to the groupbox.

Q. if condition is end by . . . . . . . .

Q. Which is used to check one among both the conditions in a given if statement?

Q. status bar is display at the . . . . . . . . of the mdi forms.

Q. How many times will the MessageBox.Show method in the following code be processed?

Q. How do you perform a group-wise summary operation using dplyr's group_by() and summarize() functions?

Q. What does the 'pch' option to par() control?

Q. Which of the following is a 3-dimensional dataset?

Q. Point out the correct statement?