Home / Neelam Mittal / Programming MCQs Solution

Programming Portal Solution

You will find all Programming Portal MCQs whose solution is updated by Neelam Mittal

Q. What is the purpose of the "throw" keyword in Java exception handling?

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

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

Q. What happen in case of multiple catch blocks?

Q. What will be the output of the following Java code? class exception_handling { public static void main(String args[]) { try { int i, sum; sum = 10; for (i = -1; i < 3 ;++i) { sum = (sum / i); S

Q. What will be the output of the following Java program? class exception_handling { public static void main(String args[]) { try { int a, b; b = 0; a = 5 / b; System.out.print("A"); } catch(ArithmeticE

Q. In Java, can a subclass access private members (fields and methods) of its superclass?

Q. In Java, can a subclass inherit private fields from its superclass?

Q. What will be printed after executing following program code? class Base{ int value = 0; Base(){ addValue(); } void addValue(){ value += 10; } int getValue(){ return value; } } class Derived extends Base{ Derived(){ addVal

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

Q. What would be the result if a class extends two interfaces and both have a method with same name and signature? Lets assume that the class is not implementing that method.

Q. What will be the output of the following Java code? class binary { public static void main(String args[]) { int num = 17; System.out.print(Integer.toBinaryString(num)); } }

Q. Which of these classes can return more than one character to be returned to input stream?

Q. Which of these stream contains the classes which can work on character stream?

Q. What will be the output when the following program is compiled and executed? abstract class TestAbstract{ String my_name; String myName(){ my_name = "Examveda"; return my_name; } abstract void display(); } public class Test extends TestAbstr

Q. What will happen after compiling this program code? abstract class MyClass{ //line 1 private int a, b; public void call(int a, int b){ this.a = a; this.b = b; System.out.print(a+b); } } public class Test{ public static void main(String ar

Q. Which object Java application uses to create a new process?

Q. Which of these is a super class of wrappers Byte and short wrappers?

Q. Which of these methods is used to check for infinitely large and small values?

Q. What will be the output of the following Java code? class Output { public static void main(String args[]) { long start, end; start = System.currentTimeMillis(); for (int i = 0; i < 10000000; i++); end = System.currentTimeMillis(); System.out.pr

Q. What is the Java 8 update of PermGen?

Q. Which of these methods is used to know whether a string contains "true"?

Q. Which of these classes can schedule task for execution in future?

Q. What is method overloading in Java?

Q. What is method overriding in Java?

Q. In which area of memory, the system stores parameters and local variables whenever a method is invoked?

Q. The main method should be static for the reason

Q. What will be the output of the following Java program? class box { int width; int height; int length; } class mainclass { public static void main(String args[]) { box obj1 = new box(); box obj2 = new box(); obj1.height = 1; obj1.length

Q. What will be the output of the following Java program? class recursion { int fact(int n) { int result; if (n == 1) return 1; result = fact(n - 1) * n; return result; } } class Output { public static void main(String args[]) {

Q. What is the value of the expression 9 % 4 in Java?

Q. What is the result of the expression (6 + 3) * 2 in Java?

Q. int ++a = 100 ; System.out.println( ++a ) ; What will be the output of the above fraction of code ?

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

Q. Which right shift operator preserves the sign of the value?

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

Q. What does the length() method of a String object in Java return?

Q. Which of these methods is used to compare a specific region inside a string with another specific region in another string?

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

Q. The String method compareTo() returns

Q. What will be the output of the following program?

Q. Which of these methods can be used to convert all characters in a String into a character array?

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

Q. Which of these methods of class StringBuffer is used to extract a substring from a String object?

Q. What is the result of compiling and running the following code?

Q. Which access modifier allows a class member to be accessed only within its own class and package?

Q. Which of the following is not an access modifier in Java?

Q. Which keyword is used to declare a method that cannot be overridden in a subclass?

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

Q. Which operator is used to check whether the expression is "NULL"?

Q. Which option enables multiple-statement execution?

Q. How many of the following attributes are allowed only for numeric types? UNSIGNED, ZEROFILL, CHARACTER SET, COLLATE

Q. The mode of search is the search string parsed into words and the search looks for rows is . . . . . . . .

Q. Which clause is used to sort a UNION result as a whole?

Q. Which parameter determines the shortest words to index in FULLTEXT indexes?

Q. In the following SQL query, what does "person" stands for?

Q. The name of the option file in Unix is . . . . . . . .

Q. What does mysql_real_connect() return if it fails?

Q. A view can refer to multiple tables via . . . . . . . .

Q. Which upgrade involves exporting existing data using mysqldump?

Q. Which statement issues a lock on tables?

Q. Which statement is used to determine the storage engine for individual tables?

Q. The option that suppresses output unless there are errors in the table is . . . . . . . .

Q. CHECK TABLE works with how many of the following? MyISAM, ARCHIVE, CSV

Q. Which keyword is used to create a table as a temporary copy of itself?

Q. What is the host name in the following MySQL command? mysql -h cobra.snake.net -p -u sampadam

Q. What is abc in the following MySQL statement? CREATE TRIGGER abc (...) (...) ON def FOR EACH ROW ghi;

Q. The metadata log is . . . . . . . .

Q. The best datatype for a column that is expected to store values up to 2 million is . . . . . . . .

Q. Which statement terminates the execution of a function?

Q. For InnoDB tables in mysqldump an online backup that takes no locks on tables can be performed by . . . . . . . .

Q. Hexadecimal numbers can be used in scientific notation.

Q. Which mode does not remove trailing spaces when CHAR values are retrieved?

Q. Which statement is used to check the status of the event scheduler at runtime?

Q. For how many of the following do interfaces exist for implementing direct native client-server protocol? Java, PHP, Ruby

Q. The "Mysql command line tool" formats are bounded by . . . . . . . .

Q. Which log does the event scheduler log to?

Q. Which of the following WHERE clauses are faster? 1. WHERE col * 3 < 9 2. WHERE col < 9 / 3

Q. The data directory subdirectory that corresponds to the nbdinfo database is . . . . . . . .

Q. What is the meaning of "Inequality Condition"?

Q. The output from PHP is . . . . . . . .

Q. Which character is illegal in naming an unquoted identifier in SQL?

Q. What is the default storage engine?

Q. Which of these is not a comment specifying construct?

Q. Which option is used to specify to the server the IP number of the server host on which the server should listen?

Q. The place where the server stores its databases and status files are the data directory.

Q. Which clause in the SQL standard controls how NULL values in a composite foreign key are handled when comparing to a primary key.

Q. What is preferred when stored procedures are not being used? CLIENT_MULTI_STATEMENTS, mysql_set_server_option()

Q. The Audit_log_events system variable is of type . . . . . . . .

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 will be the output of the following MySQL statement "NOT (Null)"?

Q. What will be the output of the following MySQL command? SELECT fname FROM person WHERE emp_id != 6 OR emp_id IS NULL;

Q. The grant table that stores users who can connect to the server and their global privileges are . . . . . . . .

Q. Is duplicate entry of primary key is allowed in SQL?

Q. The function load_defaults() reads the option files.

Q. Which script initializes the data directory during installation?

Q. How are identifiers quoted in MySQL?

Q. MySQL is freely available and is open source.

Q. Which of these grant table scope columns is case insensitive?

Q. The context in which the privilege 'CREATE TABLESPACE' applies is . . . . . . . .

Q. AUTO_INCREMENT columns must be NOT NULL.

Q. SHOW DATABASES lists the databases in the server to which you are connected.

Q. Which command is used to show all tables that are stored in a database?

Q. The statement that alters an existing event to have the given definition is . . . . . . . .

Q. Which clause is used to determine "which column to include in the query sets"?

Q. The MySQL clients are linked with . . . . . . . .

Q. Which among the following is the correct syntax for showing all tables in the database?

Q. The option that is necessary to compile a C program having math functions is . . . . . . . .

Q. To change font size of a selected slide title, you:

Q. To create a PowerPoint presentation from a template

Q. Microsoft Office Groove is

Q. The very first version of Microsoft Office was released for

Q. Which is not an option for customizing a datasheet window?

Q. In NiFi, what is the role of the "ConsumeMQTT" processor?

Q. In NiFi, what is the purpose of the "HandleHttpRequest" processor?

Q. What is the role of NiFi's "GetHTTP" processor in a data flow?

Q. How does Hadoop mitigate the risk of unauthorized data access in HDFS?

Q. How does Hadoop's Knox Gateway contribute to securing REST APIs in a Hadoop cluster?

Q. How can Hadoop's Audit Logging enhance security in a Hadoop environment?

Q. The top-level . . . . . . . . package contains three of the most important specializations in Crunch.

Q. . . . . . . . . is a single-threaded server using standard blocking I/O.

Q. The Crunch APIs are modeled after . . . . . . . . which is the library that Google uses for building data pipelines on top of their own implementation of MapReduce.

Q. Groom servers starts up with a . . . . . . . . instance and an RPC proxy to contact the bsp master.

Q. Distributed Mode are mapped in the . . . . . . . . file.

Q. Drill analyze semi-structured/nested data coming from . . . . . . . . applications.

Q. The Lucene . . . . . . . . is pleased to announce the availability of Apache Lucene 5.0.0 and Apache Solr 5.0.0.

Q. Point out the correct statement.

Q. During merging, . . . . . . . . now always checks the incoming segments for corruption before merging.

Q. Hama is a general . . . . . . . . computing engine on top of Hadoop.

Q. . . . . . . . . mode is used when you just have a single server and want to launch all the daemon processes.

Q. In HBase, what does the term "Column Family" refer to?

Q. In HBase, what is the purpose of the HBase Cell?

Q. What is the role of the HBase Server Manager in HBase architecture?

Q. What is the significance of the HBase Bloom Filter Compound feature?

Q. Which of the following tool is intended to be more compatible with HDT?

Q. . . . . . . . . is a distributed and scalable OLAP engine built on Hadoop to support extremely large datasets.

Q. Point out the wrong statement.

Q. If demux is successful within . . . . . . . . attempts, archives the completed files in Chukwa.

Q. Which of the following is a monitoring solution for hadoop?

Q. Point out the wrong statement.

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

Q. Avro is said to be the future . . . . . . . . layer of Hadoop.

Q. Point out the wrong statement.

Q. Hadoop I/O Hadoop comes with a set of . . . . . . . . for data I/O.

Q. With . . . . . . . . we can store data and read it easily with various programming languages.

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

Q. In Pig, what is the significance of the COGROUP statement?

Q. Which of the following function is used to read data in PIG?

Q. . . . . . . . . operator is used to review the schema of a relation.

Q. . . . . . . . . method tells LoadFunc which fields are required in the Pig script.

Q. Which of the following find the running time of each script (in seconds)?

Q. In Hadoop, what is the significance of the Hadoop JobTracker in a Hadoop cluster?

Q. What is the significance of the Hadoop ResourceManager "Gang Scheduling" feature in a Hadoop cluster?

Q. What is the primary role of the Hadoop NodeManager in the YARN architecture?

Q. Which hdfs command is used to check for various inconsistencies?

Q. Point out the wrong statement.

Q. Point out the wrong statement.

Q. ZooKeeper itself is intended to be replicated over a sets of hosts called . . . . . . . .

Q. Sqoop direct mode does not support imports of . . . . . . . . columns.

Q. Point out the correct statement.

Q. Data in the commit log is purged after its corresponding data in the memtable is flushed to an . . . . . . . .

Q. The fields parsed by . . . . . . . . are backed by an internal buffer.

Q. Cassandra searches the . . . . . . . . to determine the approximate location on disk of the index entry.

Q. What is the significance of the Hadoop RecordReader in a MapReduce job?

Q. In a MapReduce job, what does the term "Reducer" refer to?

Q. You can delete a column family from a table using the method . . . . . . . . of HBAseAdmin class.

Q. The Hadoop list includes the HBase database, the Apache Mahout . . . . . . . . system, and matrix operations.

Q. Point out the correct statement.

Q. Which of the following genres does Hadoop produce?

Q. What is the function of the MapReduce "Combine" phase?

Q. Which is the most popular NoSQL database for scalable big data store with Hadoop?

Q. Which of the following phases occur simultaneously?

Q. Which Hadoop component is responsible for managing and monitoring Hadoop clusters?

Q. In advanced MapReduce, what is the role of the Hadoop MapReduce "Map Output Compression"?

Q. In advanced MapReduce, what is the purpose of the Hadoop MapReduce "Map-side Filtering" technique?

Q. The updated queue configuration should be a valid one i.e. queue-capacity at each level should be equal to . . . . . . . .

Q. Which of the following statement can be used to get the storage policy of a file or a directory?

Q. The . . . . . . . . is the ultimate authority that arbitrates resources among all the applications in the system.

Q. Point out the wrong statement.

Q. Access keys allows the user to run the application even when . . . . . . . .

Q. Which of the following forces a literal constant to assume a data type other than the one its form indicates?

Q. The . . . . . . . . ensures that the computer processes any previous lines of code that affect the interface's appearance.

Q. The computer creates the object when it processes the statement containing . . . . . . . . keyword.

Q. What happens when a control is deleted from a form?

Q. . . . . . . . . are open from the View menu or pressing the key F2. The left column of the Object Browser lists the objects and classes that are available in the projects

Q. . . . . . . . . determines the type of data stored in a variable.

Q. . . . . . . . . is used to work as parents, its main property is mdi child , all the forms are open within MDI

Q. Each menu title should have an unique . . . . . . . .

Q. The Like operator returns . . . . . . . . value.

Q. A form's . . . . . . . . event is triggered when the computer processes the Me.Close() statement.

Q. In the following code, the body of If will execute if strFirst contains?

Q. In . . . . . . . . The size of the array can be changed at the run time- size changes during the program execution.

Q. Unintentional errors in application by declaring variables can be reduced by . . . . . . . .

Q. When you declare a variable in the form's declaration section, it is called as . . . . . . . .

Q. . . . . . . . . is a numeric variable used for counting something.

Q. What will be in strName after the following code is executed?

Q. A form's . . . . . . . . event is triggered when you click the Close button on its title bar.

Q. What is wrong with the expression "const dblPi As Double = 3.141593"?

Q. To change the control's Shape using the . . . . . . . . property

Q. A . . . . . . . . displays a list of choices.

Q. Which of the following rounds the contents of the intNum variable to three decimal places?

Q. In the below statement when true is returned? If str="USE" Xor strln="USE" Then

Q. An application uses a structure named Employee. Which of the following statements declares a five-element array of Employee structure variables?

Q. A nested selection structure can be contained in . . . . . . . . of another selected structure.

Q. . . . . . . . . statement is the last statement in the function.

Q. What is the array of these statements?

Q. In Visual Basic, which of the following is used for coding single-alternative and dual-alternative selection structures?

Q. Which event occurs each time an interval is elapsed in the timer?

Q. The . . . . . . . . in a pattern represents one character only.

Q. Ms Access is used to . . . . . . . .

Q. Which of the following is called the line continuation character?

Q. A structure variable named address contains a member variable named strStreet. Which of the following statements assigns the string "Maple" to the member variable?

Q. A suggestion for fixing the error appears in the . . . . . . . .

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

Q. Predicting y for a value of x that's outside the range of values we actually saw for x in the original data is called . . . . . . . .

Q. In the expression x <- 4 in R, what is the class of 'x' as determined by the `class()' function?