Home / Ram Sharma / Programming MCQs Solution

Programming Portal Solution

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

Q. What is the difference between servlets and applets? i. Servlets execute on Server; Applets execute on browser ii. Servlets have no GUI; Applet has GUI iii. Servlets creates static web pages; Applets creates dynamic web pages iv. Servlets can handle only a single request; Applet can handle multiple

Q. How many techniques are used in Session Tracking?

Q. Servlets handle multiple simultaneous requests by using threads.

Q. How many JDBC product components does the Java software provides?

Q. All raw data types (including binary documents or images) should be read and uploaded to the database as an array of

Q. JDBC facilitates to store the java objects by using which of the methods of PreparedStatement setObject () 2. setBlob() 3. setClob()

Q. Which of the following is false as far as type 4 driver is concern?

Q. What is the purpose of the 'uname' command in Linux?

Q. What does the 'ssh' command do in Linux?

Q. Which command is used to display the first few lines of a file in Linux?

Q. Which command is used to display the IP address of a system in Linux?

Q. Which of the following commands is used to display the users currently logged into the system?

Q. Which of the following commands is used to display the system's current network configuration?

Q. Which command is used to display the contents of a file in reverse order?

Q. Which command is used to change the current directory in Linux?

Q. Which of the following is an example of function overloading in C++?

Q. Which header file is required to use the std::vector container in C++?

Q. Which of the following is the correct syntax for defining a pure virtual function in C++?

Q. Which of the following is true about virtual functions in C++?

Q. Which of the following operators is used for object dereferencing in C++?

Q. Which of the following is true about constructors in C++?

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 result of the following expression in C++: '5 / 2'?

Q. What does the 'void' keyword in C++ represent?

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 function with a reference parameter in C++?

Q. Which of the following is the correct way to define a union in C++?

Q. What is the output of the following code snippet? int x = 10; int y = 20; cout << (x << 1);

Q. Which of the following is the correct way to define a pure virtual function in C++?

Q. Which of the following is the correct way to define a destructor in C++?

Q. Which of the following is the correct syntax to include a header file in C++?

Q. What is the size of the 'int' data type in C++?

Q. Which of the following is the correct syntax for handling exceptions in Python?

Q. What will the following Python code output: print(type(3.14))?

Q. Which of the following Docker commands is used to view detailed information about a Docker image?

Q. Which of the following Docker commands is used to remove unused images?

Q. Which command is used to view the Docker container's network settings?

Q. What is the purpose of the 'docker-compose pull --ignore-pull-failures' command?

Q. What is the purpose of the 'docker-compose config --volumes' command?

Q. What is the default network mode for a Docker container?

Q. Which of the following commands can be used to attach to a running Docker container?

Q. What command is used to build a Docker image from a Dockerfile?

Q. What is the purpose of the 'docker-compose.yml' file?

Q. What is a Docker 'Dockerfile'?

Q. Which command is used to remove all stopped containers and unused networks?

Q. What is the purpose of the 'docker-compose build' command?

Q. What is the purpose of the 'docker system prune' command?

Q. What is the purpose of Docker's multi-stage builds?

Q. Which Docker command is used to build a Docker image from a Dockerfile?

Q. What is the purpose of the 'docker exec' command?

Q. How can you limit the CPU usage of a Docker container?

Q. How do you list all Docker images available on your local machine?

Q. Which of the following commands is used to list Docker images?

Q. How do you list all Docker containers, including stopped ones?

Q. What is the purpose of the 'links' key in Docker Compose?

Q. Which command is used to run a one-off command in a new container in Docker Compose?

Q. Which command is used to check the status of all services in Docker Compose?

Q. How do you configure a custom Docker Compose file name?

Q. How do you restart services in Docker Compose?

Q. What is the purpose of the VOLUME instruction in a Dockerfile?

Q. A ‐‐‐‐‐ is the name of the storage location

Q. Find the false statement from the following

Q. The ‐‐‐‐‐‐‐‐‐ principle helps the programmer to build secure programs.

Q. The process of making a function to exhibit different behaviors in different instances is called ‐‐‐‐‐.

Q. Consider the following statements: int x = 22,y=15; x = (x>y) ? (x+y) : (x‐y); What will be the value of x after executing these statements?

Q. The visibility of variables inside a structure is

Q. A ‐‐‐‐‐‐‐‐ is a memory portion of memory to store a determined value.

Q. The result of a Relational operation is always

Q. What is the final value of x when the code int x; for(x=0; x<10; x++) {} is run?

Q. The ‐‐‐‐‐‐‐ are used to check the relationship between two numeric operands or expressions.

Q. C++ is originally developed by

Q. Which of the following is not a correct variable type?

Q. Which of the following are NOT provided by the compiler by default?

Q. Copy constructor must receive its arguments by __________ .

Q. Which of the following function / type of function cannot be overloaded?

Q. Which of the following statements is correct about the constructors and destructors?

Q. Which of the following statements is correct when a class is inherited publicly?

Q. The break statement causes an exit

Q. The function contain in the ios class to fill characters in the blank space

Q. The function that act as an interface to base & derived class

Q. How many times a constructor is called in the life‐time of an object?

Q. Which of the following statement is correct?

Q. If different properties and functions of a real world entity is grouped or embedded into a single element, what is it called in OOP language?

Q. Which type of members can’t be accessed in derived classes of a base class?

Q. To run date first, and then ls -l, which of the following is correct?

Q. How would you search for the string clothes at the end of the line in a file called shopping?

Q. How do you create a crontab entry?

Q. What command is used with vi editor to move the cursor to the left?

Q. What command is used to display your current working directory?

Q. What command is used to remove a file?

Q. Which of the following below are true functionalities of Kernel?

Q. Which of the following below are true functionalities of shell?

Q. Which command to use for complete details of a command on the shell?

Q. The "C" language is

Q. What is the output of the following program? line = "What will have so will" L = line.split('a') for i in L: print(i, end=' ')

Q. Output of the program? #include<iostream> using namespace std; int fun(int x = 0, int y = 0, int z) { return (x + y + z); } int main() { cout << fun(10); return 0; }

Q. How C++ compiler does differ between overloaded postfix and prefix operators?

Q. When a method in a subclass has the same name and type signatures as a method in the superclass, then the method in the subclass _____ the method in the superclass.

Q. Which of the following is a correct statement?

Q. Which among the following is a mandatory condition for downcasting?

Q. At which time does the static_cast can be applied?

Q. Which operator is required to be overloaded as member function only?

Q. Communication between services is done widely using protocol

Q. Which of the following benefit is provided by the PaaS service provider

Q. Cloud are standardized in order to appeal to the majority of its audience.

Q. Which type of Hypervisor is shown in the following figure ?

Q. Amazon’s Elastic Compute Cloud (EC2) is a well known .

Q. Cyclone is available in two service models as follows:

Q. Processes on the remote systems are identified by

Q. has many of the characteristics of what is now being called cloud computing

Q. _ is an attack which forces an end user to execute unwanted actions on a web application in which he/she is currently authenticated.

Q. Smart Dust can be used to measure the

Q. RFID stands for?

Q. The service FreeDrive is storage that allows users to view the content of others.

Q. Which of the following impose additional overhead on clients and offer faster transfer?

Q. The addition of a software package on top of a cloud storage volume makes most cloud storage offerings conform to a as a Service model.

Q. Point out the wrong statement.

Q. Based on PageRank algorithm, Google returns for a query that is parsed for its keywords.

Q. The Mapper implementation processes one line at a time via method. TOPIC 5.2 MAPREDUCE

Q. Hadoop achieves reliability by replicating the data across multiple hosts and hence does not require storage on hosts.

Q. IBM and have announced a major initiative to use Hadoop to support university courses in distributed computer programming.

Q. Which of the following is Amazon’s technical support and consulting business?

Q. _______ JavaScript is also called server-side JavaScript.

Q. _________ computing refers to applications and services that run on a distributed network using virtualized resources.

Q. Which of the following backup create a cloned copy of your current data or drive ?

Q. Which of the following options will give an error if set1={2,3,4,5}?

Q. Which of the following is incorrect variable name in Python?

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

Q. How is a function declared in Python?

Q. Which maven plugin creates the project structure?