Home / Ranjeet / Programming MCQs Solution
Programming Portal Solution
You will find all Programming Portal MCQs whose solution is updated by Ranjeet
Q. What is the purpose of the "catch" block in exception handling?
Q. Which of these class is related to all the exceptions that cannot be caught?
Q. Which of these methods return localized description of an exception?
Q. Which of these keywords is used to generate an exception explicitly?
Q. How to read a classpath file?
Q. Which of these classes encapsulate runtime state of an object?
Q. How many bits are used for generating random numbers?
Q. Which of these class is used to read characters in a file?
Q. What is the return type of Math.random() method?
Q. How to assign values to variable using property?
Q. What happens when a subclass tries to override a final method from the superclass in Java?
Q. In Java, which method is automatically called when an object is created?
Q. Which keyword is used to define a method in Java?
Q. Which of the following options is the best for generating random integer 0 or 1?
Q. What would be the behaviour if this() and super() used in a method?
Q. What is the result of the expression 5 | 3 in Java?
Q. What is the result of the expression 8 / 4 in Java?
Q. Which of these operators can skip evaluating right hand operand?
Q. The while loop repeats a set of code while the condition is not met?
Q. Which of these class is superclass of String and StringBuffer class?
Q. What will be the output of the following Java program?
Q. What will be the output of the following Java code?
Q. In Java, what does the concat() method of a String object do?
Q. What does the length attribute of an array in Java represent?
Q. Which of the following is true about the size of an ArrayList in Java?
Q. How do you declare and initialize an array of integers with 5 elements in Java?
Q. In Java, what is the purpose of the Arrays.equals() method?
Q. What is the default value of an int variable in Java if it's not explicitly initialized?
Q. What is the keyword used to declare a constant value in Java?
Q. In Java, which data type is used to store numbers with decimal points?
Q. What is the size of a float variable in Java?
Q. In Java, the word true is ................
Q. Which one is a valid declaration of a boolean?
Q. Which mode prevents MySQL to perform full checking of date parts?
Q. The statement that is used to check the status of the event scheduler at runtime is . . . . . . . .
Q. The data rows of a MyISAM table are stored in . . . . . . . .
Q. Which of the following belongs to an "aggregate function"?
Q. Which command is used to display all the existing tables in a database?
Q. Which among the following is an optional Keyword?
Q. What is generally used as a synonym for CHARACTER SET?
Q. How many options can be used to control LOCAL capability at runtime?
Q. The clause that enables mapping a short command to a long command is . . . . . . . .
Q. Which procedure parameter enables the caller to pass in a value and get back a value?
Q. INFORMATION_SCHEMA is more portable than SHOW statements.
Q. The MySQL server is highly configurable.
Q. Which function returns NULL if expr1 = expr2?
Q. What represents an 'attribute' in a relational database?
Q. Which command is used to make a script file 'run_me.sh' executable?
Q. mysql_next_result() returns a status.
Q. Triggers and events are not invoked automatically by the server.
Q. What enables encrypted connections to be established?
Q. Which statement is used to see the definition for an existing database?
Q. The log enabled by -relay-log-index is . . . . . . . .
Q. Which Key is used to link two tables in Mysql?
Q. The default path to perl in Unix is . . . . . . . .
Q. The PHP interpreter switches mode continuously.
Q. Numbers prefixed with '0x' are in base . . . . . . . .
Q. What is the default value of column?
Q. What is 'xyz' in the following SQL statement? SELECT xyz FROM table1 UNION xyz FROM table2;
Q. How can the value of recently generated sequence number be obtained?
Q. A password applies locally to an account.
Q. What is the command to disable autocommit and launch a transaction?
Q. Which Clause is used to sort the stored data in alphabetical order?
Q. In MySQL, the default size of the key buffer in MB is . . . . . . . .
Q. The binary protocol is more difficult to use.
Q. The default storage engine used is . . . . . . . .
Q. Which myisamchk variable represents the size of buffer used to hold index blocks?
Q. Anonymous accounts have user name . . . . . . . .
Q. The table that lists the column level privileges is . . . . . . . .
Q. The statement to remove indexes on tables is . . . . . . . .
Q. Which of the following is not one of PowerPoint's views?
Q. In Microsoft Word shortcut key CTRL+B is used for
Q. Which do you click to display the table\'s primary key and indexes in a separate window?
Q. What does the term "Load Balancer" mean in the context of NiFi clusters?
Q. In NiFi, what does the term "FlowFile Repository" refer to?
Q. How can you configure Hadoop to use LDAP for user authentication?
Q. What is the purpose of Hadoop's HDFS Encryption Zone?
Q. What is the primary purpose of Hadoop's Kerberos authentication?
Q. What is the role of Hadoop's HDFS snapshot feature in terms of security?
Q. How can you secure Hadoop's JobHistory Server?
Q. How can you secure the communication between nodes in a Hadoop cluster using SASL?
Q. How does Hadoop support authentication and authorization in HDFS?
Q. What is the purpose of Hadoop's HDFS Snapshot in the context of security?
Q. Drill integrates with BI tools using a standard . . . . . . . . connector.
Q. Point out the wrong statement.
Q. . . . . . . . . is a Python port of the Core project.
Q. A . . . . . . . . is used to manage the efficient barrier synchronization of the BSPPeers.
Q. Point out the correct statement.
Q. For . . . . . . . . partitioning jobs, simply specifying a custom directory is not good enough.
Q. In HBase, what does the term "MemStore" refer to?
Q. What is the significance of the HBase Region Split in HBase?
Q. What is the role of the HBase Coprocessor Observer in HBase?
Q. What is the purpose of the Oozie Sharelib in workflow automation?
Q. What is the purpose of the Oozie Sharelib Create tool?
Q. Point out the correct statement.
Q. Point out the wrong statement.
Q. Point out the correct statement.
Q. Chukwa is . . . . . . . . data collection system for managing large distributed systems.
Q. In Hive, what does the term "Bucketing" refer to?
Q. In Hive, what is the primary purpose of the ORDER BY clause in a SELECT statement?
Q. In Hive, what is the role of the LIMIT clause in a SELECT statement?
Q. What is the primary role of the Hive ORC (Optimized Row Columnar) file format?
Q. Integral literals are assumed to be . . . . . . . . by default.
Q. Point out the correct statement.
Q. HBase is a distributed . . . . . . . . database built on top of the Hadoop file system.
Q. How many formats of SequenceFile are present in Hadoop I/O?
Q. The LZO compression format is composed of approximately . . . . . . . . blocks of compressed data.
Q. The . . . . . . . . and the EditLog are central data structures of HDFS.
Q. In Pig, what is the purpose of the Pig Latin SAMPLE statement?
Q. You can run Pig in batch mode using . . . . . . . .
Q. Which of the following is correct syntax for parameter substitution using cmd?
Q. Which of the following file contains user defined functions (UDFs)?
Q. NameNode is monitored and upgraded in a . . . . . . . . transition.
Q. What is the purpose of Flume Agents in the Flume architecture?
Q. In Sqoop, what is the significance of the "--as-parquetfile" option in an export command?
Q. What is the purpose of the Sqoop "--query" option in an import command?
Q. Internal authentication stores usernames and bcrypt-hashed passwords in the . . . . . . . . table.
Q. User accounts may be altered and dropped using the . . . . . . . . Query Language.
Q. Which of the following is a singleton instance class?
Q. What is the purpose of the Hadoop RecordReader in a MapReduce job?
Q. Maximum virtual memory of the launched child-task is specified using . . . . . . . .
Q. What is the role of the Combiner in the MapReduce model?
Q. What is the role of the Hadoop Secondary NameNode in MapReduce?
Q. Which Hadoop ecosystem tool is used for managing and monitoring Hadoop clusters?
Q. What is the purpose of the ResourceManager in Hadoop YARN?
Q. In Hadoop MapReduce, what is the role of the Hadoop Counters?
Q. . . . . . . . . generates keys of type LongWritable and values of type Text.
Q. Which of the following command is used to dump the log container?
Q. In . . . . . . . . the default job is similar, but not identical, to the Java equivalent.
Q. Point out the correct statement.
Q. Point out the correct statement.
Q. Point out the correct statement.
Q. Point out the wrong statement.
Q. The file to which data is write is referred to as . . . . . . . .
Q. when we declare the variable in a Particular control of vb then it is . . . . . . . . variable .
Q. In VB ,We can use Public or Dim statement to declare an array .
Q. A . . . . . . . . loop is a loop whose processing is controlled by a counter.
Q. A class-level variable is declared using . . . . . . . . keyword.
Q. . . . . . . . . menu is open by right button of the mouse .
Q. The programmer use . . . . . . . . property to refer to menu element in code.
Q. Where does the form's Text Property appear?
Q. Is there an error in the below code?
Q. The long form of SDI is . . . . . . . .
Q. The . . . . . . . . in a pattern represents zero or more characters.
Q. A . . . . . . . . is an item of data whose values do not change while the application is running.
Q. A variable's . . . . . . . . indicates where the variable can be used in an application code.
Q. Which of the following statements pauses program execution for 1 second?
Q. What will be the content of Text after the code is executed with id=2?
Q. What will be the output of the following Visual Basic code?
Q. Using a named constant is advantageous because to change a value in future, change . . . . . . . .
Q. In VB, The. . . . . . . . function converts all the characters of a string to capital letters.
Q. Which option is used to align two or more controls by their left, right, top or bottom borders?
Q. . . . . . . . . uses short phrases to describe the steps the procedure must take.
Q. The . . . . . . . . validator is used to verify that a control contains data.
Q. The long form of MDI is. . . . . . . ..
Q. String data type can store from zero to . . . . . . . . Unicode characters.
Q. when we declare the variable in . . . . . . . . of VB then it is public variable
Q. . . . . . . . . the documentation refers to putting the documentation in a safe place.
Q. What does namespace contain?
Q. ControlChars.NewLine constant is a . . . . . . . . constant.
Q. Who displays the item contained in each project?
Q. The . . . . . . . . setting removes the form border.
Q. In R, what is the purpose of the if-else statement?
Q. Which action tags are used in JSP for developing web application with Java Bean?
Q. Which package is used for Remote Method Invocation (RMI)?
Q. What is the purpose of the 'find' command in Linux?
Q. Which command is used to add a new group in Linux?
Q. Which file contains the configuration for the system hostname in Linux?
Q. Which of the following cannot be overloaded in C++?
Q. Which function is used to write data to a file in C++?
Q. What does the 'static' keyword do when applied to a local variable inside a function?
Q. Which of the following is not a feature of object-oriented programming in C++?
Q. Which of the following is a correct declaration of a C++ array?
Q. Which of the following is not a valid C++ identifier?
Q. Which operator is used to access a pointer's value in C++?
Q. Which of the following C++ features allows a class to inherit from another class?
Q. Which of the following is true about C++ arrays?
Q. Which of the following is the correct way to declare a reference 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 move assignment operator in C++?
Q. Which of the following is the correct way to define a function outside a class in C++?
Q. Which of the following is not a valid C++ data type?
Q. Which of the following is a valid C++ identifier?
Q. Which of the following is the correct syntax for defining a constant in C++?
Q. What will be the output of the following code: print(3 // 2)?
Q. What will be the output of the following Python code: print('Hello' * 3)?
Q. Which of the following data types is immutable in Python?
Q. What does the 'docker pull' command do?
Q. Which of the following is true about Docker containers?
Q. Which Docker command is used to view detailed information about a container?
Q. Which command is used to stop a Docker container?
Q. What is the purpose of the 'docker pause' command?
Q. Which Docker command is used to remove all stopped containers?
Q. What is the purpose of the 'docker-compose down' command?
Q. Which of the following is the purpose of the 'docker-compose logs' command?
Q. Which of the following is NOT a valid Docker command?
Q. Which of the following commands lists all the Docker networks?
Q. Which of the following is a valid Docker command to view the logs of a container?
Q. Which Docker command is used to remove an image?
Q. Which Docker command is used to get the stats of running containers?
Q. What does the '--detach' or '-d' flag do when running 'docker run'?
Q. How can you scale a service in Docker Compose?
Q. What does the 'docker ps' command display?
Q. What is the purpose of Docker Compose?
Q. Which command is used to remove a Docker container?
Q. Which command is used to view the current Docker Compose configuration?
Q. What is the default network mode for services in Docker Compose?
Q. How do you define the network settings for a service in Docker Compose?
Q. Which of the following is a valid restart policy in Docker Compose?
Q. What is the default name of the Docker Compose configuration file?
Q. Which command is used to view the history of a Docker image?
Q. Which command is used to unpause a paused Docker container?
Q. Which command is used to inspect a Docker container?
Q. ‐‐‐‐‐‐‐ can represent items of varying data types to an item.
Q. Tne multiple use of input and output operator is called …………….
Q. A static variable is initialized to ‐‐‐‐‐when the first object of its class is created.
Q. ‐‐‐‐‐‐‐‐ are normally used to maintain values common to the entire class.
Q. ‐‐‐‐‐‐‐ is the actual body of the function
Q. ‐‐‐‐‐‐‐‐‐‐‐ Statement used to branch unconditionally from one point to another in the program.
Q. int d=int (a) + int (b);This statement is an example of ‐‐‐‐‐‐‐
Q. ‐‐‐‐‐ statement is used to print a blank line in CPP program
Q. By default, the members of a C++ class are:
Q. Constructors __________ to allow different approaches of object construction.
Q. Which of the following statement is correct?
Q. Which of the following also known as an instance of a class?
Q. The function contain in the class iomanip to fill characters in the un used space
Q. The function contain in the ios class to set width
Q. Which function is in the istream class
Q. The keyword to convert pointer into non pointer & non pointer into pointer
Q. The pointer refers to an object that has called the member function currently
Q. How do you display the kernel release?
Q. Which command is used to unmount a filesystem?
Q. The IP address are based on
Q. Which command reduces the size of a file?
Q. Which of the following commands can be used to change the group owner of a file?
Q. Command used to create an empty file.
Q. How do you copy an entire directory structure? E.g. from Project to Project.backup
Q. The statement print f ("%d", 10 ? 0 ? 5 : 1 : 12); will print?
Q. Which of the following operators cannot be overloaded?
Q. Which of the following is not a member of class?
Q. class Test { int x; }; int main() { Test t; cout << t.x; return 0; }
Q. Identify the user-defined types from the following?
Q. . as a utility is a dream that dates from the beginning of the computing industry itself
Q. captive requires that the cloud accommodate multiple compliance regimes.
Q. Which of the following is Type 2 VM ?
Q. The percentage of time the system is up and running smoothly is referred as .
Q. Point out the correct statement.
Q. In distributed system, each processor has its own
Q. Which of the following cloud concept is related to pooling and sharing of resources?
Q. systems used to track and identify the location of objects in real time
Q. Point out the correct statement.
Q. method publishes messages to pub/sub.
Q. Amazon Machine Images are virtual appliances that have been packaged to run on the grid of nodes.
Q. Dynamodb is type of storage
Q. Network bottlenecks occur when data sets must be transferred
Q. Which of the following is a compliance standard?
Q. Which of the following layers are defined by the ZigBee stack?
Q. Data stored in domains doesn’t require maintenance of a schema.
Q. Annotation which allows the Jaxb2Marshaller marshaller to detect a class’s (i.e., object’s) fields.
Q. Point out the wrong statement.
Q. offers various Linux distributions upon which you can build a virtual machine.
Q. allows different operating systems to run in their own memory space.
Q. Which of the following is the highest degree of integration in cloud computing?
Q. enables batch processing, which greatly speeds up high-processing applications.
Q. A service that concentrates on hardware follows the as a Service model.
Q. Which of the following provide system resource access to virtual machines?
Q. The right level of parallelism for maps seems to be around maps per- node.
Q. Cloud computing networks are designed to support only private or hybrid clouds.