Home / Vikash Gupta / Programming MCQs Solution
Programming Portal Solution
You will find all Programming Portal MCQs whose solution is updated by Vikash Gupta
Q. Which of these classes is super class of Exception class?
Q. Which of these classes is used to define exceptions?
Q. Which of these keywords are used for generating an exception manually?
Q. What is the "super" keyword used for in Java?
Q. In Java, can a subclass inherit static methods from its superclass?
Q. Which of the following access specifiers can be used for an interface?
Q. Which of these is a wrapper for data type int?
Q. Which of these interfaces is implemented by TimerTask class?
Q. Which of these methods of Boolean wrapper returns boolean equivalent of an object.
Q. What is method overriding in Java?
Q. What is the difference between method overloading and method overriding in Java?
Q. The finalize() method is called just prior to
Q. What is the value of the expression false && false in Java?
Q. What will be the output of the following Java program?
Q. What will be the output of the following Java program?
Q. What will be the output of the following Java code?
Q. What will be the output of the following Java code?
Q. What is the correct way to check if a string starts with a specific prefix in Java?
Q. Which of this method of class String is used to extract a substring from a String object?
Q. What is the correct way to copy the elements of one array to another in Java?
Q. How do you find the index of an element in an ArrayList named list in Java?
Q. What is the purpose of the Arrays.sort() method in Java?
Q. Which keyword is used to explicitly specify that a method should be overridden in a subclass?
Q. In Java, what is the purpose of the final keyword when applied to a class?
Q. What is the range of values that can be stored in a char variable in Java?
Q. Which of the following automatic type conversion will be possible?
Q. Is SimpleDateFormat thread safe?
Q. What is the prototype of the default constructor of this Java class? public class prototype { }
Q. What is generally done if an error occurs during the transaction?
Q. Which table is preferred when there are many updates?
Q. The facility that allows nesting one select statement into another is . . . . . . . .
Q. PHP scripts are located in the web server document tree.
Q. The one that is more restrictive is . . . . . . . . mysql_query(), mysql_real_query()
Q. The column not returned by 'OPTIMIZE TABLE' is . . . . . . . .
Q. Mysql support different character sets, which command is used to display all character sets?
Q. How many of the following does not return a value? mysql_close(), mysql_init, mysql_real_connect
Q. Which option prints output in table-format when MySQL is run interactively?
Q. What is the size of the BIT type?
Q. Which keyword is used to create a database?
Q. The AUTO_INCREMENT column attribute is best used with which type?
Q. The AUTO_INCREMENT column attribute is best used with . . . . . . . .
Q. Which table is used to run a UNION-type query on MyISAM tables?
Q. Which statement is used to show the server's current character set and collation settings?
Q. The most general purpose language is . . . . . . . .
Q. A stored procedure is invoked using the statement . . . . . . . .
Q. Which statement is used to select columns and rows from the table?
Q. When relocating an individual table, the table to be relocated should be . . . . . . . .
Q. Which command is used for the table definition in Mysql?
Q. If an error occurs during the transaction the troubleshoot is . . . . . . . .
Q. The optimizer_prune_level is set by default.
Q. INT2 maps to MySQL type . . . . . . . .
Q. Usage of aggregates in WHERE clause is allowed.
Q. What is abc in the following MySQL statement? DECLARE abc HANDLER FOR def ghi;
Q. Which of these columns are faster? Variable length, Fixed length
Q. Which among the following tags belong to Data Manipulation language?
Q. What is the general statement-issuing routine?
Q. Bulk loading is less efficient than single row loading.
Q. What is the meaning of "Temporary Tables" in Mysql?
Q. Which line is written at the top of the script to write a Perl script using CGI.pm?
Q. In the following SQL command "*" stands for? SELECT * FROM person;
Q. For what can the FULLTEXT indexes be created for?
Q. The variable that is a handle to a database object is . . . . . . . .
Q. An embedded application includes the server side only.
Q. The tool for copying databases is . . . . . . . .
Q. The non handle array representing a row of values is . . . . . . . .
Q. The operator used in PHP to access property of an object is . . . . . . . .
Q. Which statement suspends the replication related activity of the slave server?
Q. Triggers and events are invoked automatically by the server.
Q. What is the durability property of transactions?
Q. The function used to convert a string to an int is . . . . . . . .
Q. The following MySQL statement is valid. SELECT abc, xyz FROM table1 UNION abc, def FROM table2;
Q. Which command is used in Mysql command line tool to return to window command shell?
Q. What does 'apply design template' do?
Q. In Microsoft Word shortcut key CTRL+R is used for
Q. When increasing the Control Padding, space is added where?
Q. In Apache NiFi, what is the purpose of the "RouteOnAttribute" processor?
Q. In Apache NiFi, what is the function of the "ControlRate" processor?
Q. In NiFi, what is the primary purpose of the "PutHBaseJSON" processor?
Q. What is the significance of NiFi's "LogAttribute" processor in data flow management?
Q. In NiFi, what is the role of the "PublishKafka" processor?
Q. How does Hadoop's audit logging enhance security?
Q. How can you secure the data stored in HDFS from unauthorized access?
Q. What is the purpose of Hadoop's Secure DataNode?
Q. How does Hadoop's Knox Gateway enhance security in a Hadoop cluster?
Q. Point out the wrong statement.
Q. . . . . . . . . is used with Pig scripts to write data to HCatalog-managed tables.
Q. . . . . . . . . is a multi-threaded server using standard blocking I/O.
Q. On the write side, it is expected that the user pass in valid . . . . . . . . with data correctly.
Q. HCatalog supports the same data types as . . . . . . . .
Q. In HBase, what is the purpose of the HBase Write-Ahead Log (WAL)?
Q. In HBase, what is the purpose of the HBase Distributed Log Replay?
Q. In Oozie, what is the purpose of the "capture-output" property in a workflow action?
Q. What is the purpose of the Oozie Sharelib Update tool?
Q. What is the significance of the Oozie Bundle Application in workflow automation?
Q. In Oozie, what does the term "data-in" represent in a coordinator workflow?
Q. . . . . . . . . is a columnar storage format for Hadoop.
Q. Collectors write chunks to logs/*.chukwa files until a . . . . . . . . MB chunk is reached.
Q. Which of the following has the core Eclipse PDE tools for HDT development?
Q. Data analytics scripts are written in . . . . . . . .
Q. Point out the correct statement.
Q. Point out the wrong statement.
Q. When $HIVE_HOME/bin/hive is run without either the -e or -f option, it enters . . . . . . . . mode.
Q. In Hadoop MapReduce, what is the role of the CombineFileInputFormat?
Q. Point out the wrong statement.
Q. Automatic restart and . . . . . . . . of the NameNode software to another machine is not supported.
Q. The HDFS file system is temporarily unavailable whenever the HDFS . . . . . . . . is down.
Q. Which of the following is the slowest compression technique?
Q. In Pig, what does the term "PiggyBank" refer to?
Q. Which of the following command is used to show values to keys used in Pig?
Q. What is the purpose of the Hadoop ResourceManager "Node Heartbeats" in a Hadoop cluster?
Q. What is the significance of the Sqoop "--split-by" option in the import command?
Q. In Sqoop, what is the purpose of the "--direct" option in an import command?
Q. ZooKeeper is used for configuration, leader election in Cloud edition of . . . . . . . .
Q. Apache Cassandra is a massively scalable open source . . . . . . . . database.
Q. There are . . . . . . . . types of read requests that a coordinator can send to a replica.
Q. Zookeeper keep track of the cluster state such as the . . . . . . . . table location.
Q. Point out the correct statement.
Q. . . . . . . . . allows users to specify the target location inside of Hadoop.
Q. Point out the wrong statement.
Q. In a MapReduce program, what is the role of the Hadoop Job object?
Q. What is the role of the Hadoop Job object in a MapReduce application?
Q. What is the role of the Hadoop Mapper.Context in a MapReduce application?
Q. . . . . . . . . class adds HBase configuration files to its object.
Q. The right level of parallelism for maps seems to be around . . . . . . . . maps per-node.
Q. What is the core component of Hadoop responsible for distributed storage?
Q. Which component in MapReduce is responsible for sorting and grouping data?
Q. What is the role of the Secondary NameNode in Hadoop?
Q. What is the significance of the Hadoop Secondary NameNode in the architecture?
Q. What does the term "MapReduce chaining" refer to in advanced MapReduce?
Q. In advanced MapReduce, what is the role of the Hadoop MapReduce "Map-side Filtering" technique?
Q. What is the purpose of the Hadoop MapReduce "DistributedCache" in advanced MapReduce?
Q. The simplest way to do authentication is using . . . . . . . . command of Kerberos.
Q. Point out the wrong statement.
Q. . . . . . . . . method adds the deprecated key to the global deprecation map.
Q. Each object used in a object oriented programming is created from . . . . . . . .
Q. Which property is used to specify a combo box's style?
Q. Lifetime of a class-level variable is till . . . . . . . .
Q. The instruction above the loop is known as the . . . . . . . .
Q. The instruction in the loop body is referred to as . . . . . . . .
Q. The . . . . . . . . displays the most commonly used items.
Q. The items listed in the Call statement are referred to as . . . . . . . .
Q. What value is stored in the intNum variable when the loop ends?
Q. Programmers use . . . . . . . . when they need to pass a group of related variables.
Q. Programmers refer to the sequence of character as . . . . . . . .
Q. . . . . . . . . is the universal coding scheme for characters.
Q. An arithmetic expression contains one or more . . . . . . . .
Q. Objects are represented by . . . . . . . . variables and . . . . . . . . properties.
Q. The variable that does not change the value during execution of program is. . . . . . . .
Q. The main property of ADODC control property is . . . . . . . .
Q. A constructor is a . . . . . . . .
Q. What happens when both the minimize box and maximize box property are set to false?
Q. Data in an array can be distinguished using . . . . . . . . number.
Q. The data control s used to link . . . . . . . .
Q. the main property of check box is . . . . . . . ..
Q. The . . . . . . . . validator is used to verify that an entry matches a specific pattern.
Q. A variable is scoped to a global or local variable depending on how it is declared.
Q. . . . . . . . . operator reverses the truth value of the operation.
Q. The . . . . . . . . operator is commonly used to determine whether a number is even or odd.
Q. You refer to the structure variable by its . . . . . . . .
Q. ADO stands for . . . . . . . .
Q. Text box is aligned using . . . . . . . .
Q. The rules of a programming language are called its . . . . . . . .
Q. If Linear regression model perfectly first i.e., train error is zero, then . . . . . . . .
Q. Point out the wrong statement?
Q. Point out the correct statement?
Q. What will be the output of the following R program? y <- 0:5 vector(y) y[3]
Q. Which of the following is an advantage of the statement – Separation of business logic from JSP ?
Q. Which of these are types of multitasking?
Q. Which command is used to display the current date and time in Linux?
Q. Which command is used to extract files from a tar archive?
Q. Which command is used to display the system's memory usage in Linux?
Q. What is the purpose of the 'tar' command in Linux?
Q. What does the 'pwd' command do in Linux?
Q. What is the purpose of the 'sudo' command in Linux?
Q. Which command is used to change the permissions of a file in Linux?
Q. Which of the following is a Linux package manager?
Q. Which command is used to display the last few lines of a file?
Q. What is the purpose of the 'chmod 777' command?
Q. Which process ID (PID) is assigned to the init system process in Linux?
Q. Which keyword is used to define a class that cannot be instantiated?
Q. Which of the following is the correct way to define a function with a final specifier in C++?
Q. Which of the following is the correct way to define a function with a noexcept specifier in C++?
Q. Which C++ function is used to get the length of a string?
Q. What is the output of the following C++ code? int a = 7; cout << a >> 1;
Q. What is the purpose of the 'virtual' keyword in C++?
Q. Which of the following is the correct way to initialize a string in C++?
Q. Which of the following is the correct way to define a function with a return type in C++?
Q. What is the output of the following code snippet? int x = 10; int y = 20; cout << (x -= y);
Q. What is the output of the following code snippet? int x = 10; int &ref = x; ref = 20; cout << x;
Q. What is the purpose of the 'new' keyword in C++?
Q. Which of the following is the correct way to declare a pointer in C++?
Q. What will be the output of the following C++ code? int x = 10; int y = 5; cout << x / y;
Q. Which of the following operators is used for exponentiation in Python?
Q. Which of the following commands is used to stop all running Docker containers?
Q. Which of the following commands can be used to list the running Docker containers?
Q. Which command is used to remove all unused Docker build cache?
Q. What is the purpose of the 'docker volume' command?
Q. Which of the following Docker commands is used to build an image from a Dockerfile?
Q. Which of the following options is true about Docker volumes?
Q. What is the purpose of the 'docker info' command?
Q. Which of the following is true about Docker tags?
Q. What is the purpose of Docker's 'ENTRYPOINT' instruction in a Dockerfile?
Q. Which Docker command is used to pause a running container?
Q. Which of the following is true about Docker images?
Q. Which Docker command is used to list all images on the local system?
Q. Which command is used to list all Docker networks?
Q. What is the purpose of the 'docker-compose up' command?
Q. Which of the following Docker commands is used to view the history of an image?
Q. What is the default mode in which 'docker-compose' runs?
Q. What is the purpose of the 'docker commit' command?
Q. What is the purpose of Docker volumes?
Q. What is the default location where Docker stores images and containers on Linux?
Q. Which of the following is used to store persistent data outside of containers?
Q. Which of the following Docker commands is used to pull an image from a remote registry?
Q. Which command is used to start a stopped Docker container?
Q. Which command is used to remove a Docker network?
Q. Which command is used to list Docker networks?
Q. What is the purpose of the ONBUILD instruction in a Dockerfile?
Q. What is the purpose of the USER instruction in a Dockerfile?
Q. Which command is used to view logs of a Docker container?
Q. What is the default network driver in Docker?
Q. Which file is used to define a Docker image?
Q. What is Docker primarily used for?
Q. Array indexing always starts with the number
Q. Identify the data type of the value ‐2567113254L
Q. ‐‐‐‐‐ are the reserved words of the programming language.
Q. ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ are conceptual things which exists only during the development process.
Q. Which of the following is not a feature of OOPs.
Q. ‐‐‐‐‐‐‐‐ contains function prototype for the standard input and output functions.
Q. ‐‐‐‐‐‐‐‐‐‐ provides interface between the object’s data and program.
Q. The technique of Hiding internal details in an object is called‐‐‐‐‐
Q. In an assignment statement a=b Which of the following statement is true?
Q. If the copy constructor receives its arguments by value, the copy constructor would
Q. Which constructor function is designed to copy objects of the same class type?
Q. Destructor has the same name as the constructor and it is preceded by ______ .
Q. Constructor is executed when _____.
Q. The function used to receive one character at a time
Q. The standard library inherited from istream & ostream
Q. A member function for unary operator overloading takes‐‐‐‐ ‐arguments.
Q. The operators can’t be overloaded
Q. A destructor takes __________ arguments.
Q. Which of the following is an abstract data type?
Q. Which feature can be implemented using
Q. Which feature of OOP indicates code reusability?
Q. Which of the following is used for comments in
Q. Destructor has a same name as the constructor and it is preceded by?
Q. Which of the two features match each other?
Q. How do you display your current crontab entry?
Q. Which file determines what will be run at each runlevel?
Q. Which runlevel allows full multiuser mode but with no graphical login manager?
Q. How do you delete your crontab entry?
Q. What command is used with vi editor to delete three words?
Q. What command is used to terminate a process?
Q. What is the shortcut to the home directory?
Q. Through the design mode of a builder tool, we use ___ or ____ to customize the bean.
Q. What is the right way to access value of structure variable book{ price, page }?
Q. What is the output of the following? x = ['ab', 'cd'] print(len(list(map(list, x))))
Q. What is the output of the following program : print 'cd'.partition('cd')
Q. When one object reference variable is assigned to another object reference variable then
Q. Which of the following is not correct for virtual function in C++?
Q. Which of the following functions must use reference?
Q. Which operator is having the highest precedence?
Q. If multiple inheritance is implemented, which upcasting will be correct?
Q. How can the member functions in the container be accessed?
Q. Which data type is used to represent the absence of parameters?
Q. Which one is NOT generally a change after Virtualization?
Q. Which of the following provide system resource access to virtual machines ?
Q. refers to an increase in the performance by the addition of more resources along the service layers
Q. In this type of cloud, the cloud is composed of multiple internal or external cloud.
Q. automatically identifying a Web user's location
Q. In particular, layers have which of the following characteristics?
Q. The method which offers higher speeds of I/O transfers is
Q. The message in pub/sub is an opaque blob of
Q. Security methods such as private encryption, VLANs and firewalls comes under subject area.
Q. To configure Jaxb2Marshaller marshaller we require.
Q. Cloud storage data usage in the year 2020 is estimated to be percent resident by IDC.
Q. is a CPU emulator and virtual machine monitor.
Q. A service provider gets the same benefits from a composable system that a user does.
Q. Point out the wrong statement.
Q. The output of the reduce task is typically written to the FileSystem via
Q. The framework groups Reducer inputs by key in stage.
Q. A larger cloud network can be built as either a layer 3 or layer 4 network.