0

programming languages Online Quiz - 235

Description: programming languages Online Quiz - 235
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0
  1. File Transmission Protocol

  2. File Transfer Protocol

  3. Transmission control Protocol

  4. Data Transmission protocol


Correct Option: B
  1. LRECL

  2. RECFM

  3. None of the attributes can be changed

  4. All the attributes can be changed


Correct Option: D
  1. GET

  2. PUT

  3. EXIT

  4. BYE


Correct Option: C
Explanation:

To solve this question, the user needs to know what FTP is and what parameters it uses. FTP (File Transfer Protocol) is a standard network protocol used to transfer files from one host to another over the Internet.

Now, let's go through each option and explain why it is right or wrong:

A. GET: This option is a valid FTP parameter. It is used to retrieve a file from a remote server.

B. PUT: This option is a valid FTP parameter. It is used to upload a file to a remote server.

C. EXIT: This option is not a valid FTP parameter. It is a command to exit the FTP client.

D. BYE: This option is a valid FTP parameter. It is used to terminate an FTP session.

Therefore, the answer is:

The Answer is: C

  1. TERMINATE

  2. DELETE

  3. CLOSE

  4. None of the above


Correct Option: C
Explanation:

To solve this question, the user needs to know about computer networking and the basic commands used to manage network connections.

Option A, TERMINATE, is not a valid command to terminate a connection with another computer. There is no such command in computer networking.

Option B, DELETE, is not a valid command to terminate a connection with another computer. This command is used to delete files or directories, not network connections.

Option C, CLOSE, is the correct command to terminate a connection with another computer. This command is used to close a network connection or a file stream.

Option D, None of the above, is incorrect because option C, CLOSE, is the correct command to terminate a connection with another computer.

Therefore, the answer is: C. CLOSE.

  1. 4

  2. 8

  3. 6

  4. 2


Correct Option: D
Explanation:

To solve this question, the user needs to understand the program specification and the field length for the status code.

Option A: 4. This option might be correct for some programs, but it does not match the specified program in the question.

Option B: 8. This option might be correct for some programs, but it does not match the specified program in the question.

Option C: 6. This option might be correct for some programs, but it does not match the specified program in the question.

Option D: 2. This option is the correct answer according to the program specification given in the question.

Therefore, the answer is: The Answer is D.

  1. PLAN Name in which the DB2 program has to be bound

  2. Collection name in to which the program has to be bound

  3. Database Name

  4. Dataset in which the DB2 program resides


Correct Option: A
Explanation:

To answer this question, the user needs to have knowledge of DB2 and the process of binding a program.

The PLAN parameter in DB2 refers to the plan name in which the DB2 program has to be bound.

Option A is correct because the PLAN parameter specifies the name of the plan to which the program should be bound during the BIND process.

Option B is incorrect because the collection name refers to a set of related objects in DB2, and it is not related to the PLAN parameter.

Option C is incorrect because the database name refers to the name of the database in which the tables and other objects used by the program are located, and it is not related to the PLAN parameter.

Option D is incorrect because the dataset refers to the physical location of the program code, and it is not related to the PLAN parameter.

Therefore, the correct answer is:

The Answer is: A. PLAN Name in which the DB2 program has to be bound

  1. Authentication failure

  2. SELECT statement has resulted in retrieval of more than one row

  3. Generated when the consistency tokens in the DBRM and the load module are different

  4. Resource Unavailable


Correct Option: C
Explanation:

To understand this question, the user needs to know what SQL is and its error codes. SQL (Structured Query Language) is a programming language used to manage and manipulate relational databases. SQL error codes are used to indicate any errors or problems that occur during SQL processing.

Option A: Authentication failure. This error occurs when a user provides incorrect login credentials while trying to access the database. However, SQL code -818 is not related to authentication failure.

Option B: SELECT statement has resulted in retrieval of more than one row. This error occurs when a SELECT statement is expected to return only one row, but it returns more than one row. However, SQL code -818 is not related to this error.

Option C: Generated when the consistency tokens in the DBRM and the load module are different. This error occurs when there is a mismatch between the consistency tokens in the DBRM (Database Request Module) and the load module. Consistency tokens are used to ensure that the DBRM and the load module are in sync. SQL code -818 is related to this error.

Option D: Resource Unavailable. This error occurs when the required resources are not available in the system. However, SQL code -818 is not related to this error.

Therefore, the correct answer is:

The Answer is: C. Generated when the consistency tokens in the DBRM and the load module are different.

  1. TSO

  2. CICS

  3. IMS

  4. ENDEVOUR


Correct Option: D
Explanation:

To solve this question, the user needs to have basic knowledge of mainframe environments and their capabilities to access DB2.

Now let's go through each option and explain why it is right or wrong:

A. TSO - This environment can access DB2. TSO (Time Sharing Option) is an interactive dialog with the operating system, which provides an interface for the user to interact with the system. DB2 can be accessed through TSO environment using SPUFI and QMF tools.

B. CICS - This environment can access DB2. CICS (Customer Information Control System) is a transaction processing system that can access DB2 databases to store and retrieve data.

C. IMS - This environment can access DB2. IMS (Information Management System) is a hierarchical database management system that can access DB2 databases using the DLI (Data Language Interface) module.

D. ENDEVOUR - This environment is a software change management tool and does not have the ability to access DB2.

Therefore, the correct answer is:

The Answer is: D. ENDEVOUR

What are the advantages of using a PACKAGE?

  1. Avoid having to bind a large number of DBRM members into a plan

  2. Minimize fallback complexities if changes result in an error

  3. Avoid cost of a large bind

  4. Time consumption is reduced


Correct Option: D

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) Avoid having to bind a large number of DBRM members into a plan - This option is incorrect because using a package does not necessarily avoid the need to bind a large number of DBRM (Database Request Module) members into a plan. A package is a container that holds the compiled SQL statements and associated access paths, but it still requires binding.

Option B) Minimize fallback complexities if changes result in an error - This option is incorrect because using a package does not specifically minimize fallback complexities. Fallback complexities are related to the process of reverting to a previous version of the program or application if changes result in an error, and using a package does not directly address this.

Option C) Avoid cost of a large bind - This option is incorrect because using a package does not necessarily avoid the cost of binding. Binding is still required for a package in order to compile the SQL statements and create the access paths.

Option D) Time consumption is reduced - This option is correct because using a package can reduce the time consumption in certain scenarios. When a package is bound, the SQL statements and access paths are already compiled and stored, which can save time during execution as the statements do not need to be recompiled each time they are executed.

The correct answer is D) Time consumption is reduced.

The actual call to access the database will be done by calling

  1. CBLTDLI

  2. PLITDLI

  3. Only a

  4. A or b


Correct Option: D
Explanation:

To answer this question, the user needs to have knowledge of database access methods.

The correct answer is:

D. A or B

Explanation:

CBLTDLI and PLITDLI are both programming interfaces for accessing databases. CBLTDLI is a COBOL interface, and PLITDLI is a PL/I interface. Both interfaces are used to submit commands and retrieve data from databases. Therefore, either option A or option B can be used to access the database. Option C is incorrect because only option A or B can be used to access the database, not just option A.

Which one is not a type of VSAM file?

  1. KSDS

  2. ESDS

  3. RSDS

  4. RRDS


Correct Option: C
Explanation:

To solve this question, the user needs to have knowledge about VSAM files and their types.

Now, let's go through each option and explain why it is right or wrong:

A. KSDS: This option is a type of VSAM file. KSDS stands for Key Sequenced Data Set and is used to store records in a sequential order based on a primary key.

B. ESDS: This option is a type of VSAM file. ESDS stands for Entry Sequenced Data Set and is used to store records in the order in which they are written to the file.

C. RSDS: This option is not a type of VSAM file. RSDS is not a valid acronym for a VSAM file type.

D. RRDS: This option is a type of VSAM file. RRDS stands for Relative Record Data Set and is used to store records based on relative byte positions within the file.

Therefore, the answer is: C

What is S0C4 error?

  1. Caused by invalid Data in a Numeric field

  2. Protection Exception

  3. Timeout

  4. Data protection Exception


Correct Option: B

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) Caused by invalid Data in a Numeric field - This option is incorrect. The S0C4 error is not caused by invalid data in a numeric field. Instead, it is related to a protection exception.

Option B) Protection Exception - This option is correct. The S0C4 error is a protection exception error. It occurs when a program attempts to access storage that it does not have permission to access. This can happen due to various reasons such as accessing an uninitialized variable or accessing memory outside the program's allocated storage.

Option C) Timeout - This option is incorrect. The S0C4 error is not related to a timeout. It is specifically related to a protection exception.

Option D) Data protection Exception - This option is incorrect. The S0C4 error is related to a protection exception, but it is not specifically called a "Data Protection Exception."

The correct answer is B) Protection Exception. This option is correct because the S0C4 error is a protection exception error.

What the below command does? echo var=$

  1. Assigns value of < to var variable

  2. Assigns value of $< to var variable

  3. Gets input from stdin and assigns that to var variable

  4. Assigns previously returned value to var variable


Correct Option: C

AI Explanation

To explain the given command, let's break it down:

`echo var=$

Assume that the .login/.profile file has the following command umask 27 What is the permission set upon creating a new file?

  1. -rwx--x---

  2. -rw--wx-wx

  3. -----w-rwx

  4. -rw-r-----


Correct Option: D

What is the difference between $* and $@?

  1. $* returns the number of arguments passed whereas $@ represents the arguments list.

  2. All arguments are double quoted using $* whereas all arguments are individually double quoted when using $@.

  3. $* is used in for loop whereas $@ is used in while loop.

  4. $* and $@ are same


Correct Option: B

What does $! represent?

  1. Process ID of current process

  2. Process ID of last background process

  3. Process ID of first background process

  4. Process ID of foreground process


Correct Option: B

What is the output of the below command? a=2;(a=3; echo -n $a) ; echo -n $a

  1. 33

  2. 22

  3. 32

  4. none


Correct Option: C

What does the below line does when inserted as first line in a shell script and executed? #! /usr/bin/bash -f

  1. bash is used to intrepret the script and it does not invoke .bashrc before executing the script

  2. bash is used to intrepret the script and it does invoke .bashrc before executing the script

  3. bash as well as sh are used to intrepret the script

  4. none


Correct Option: A

Which of the following compiler options can affect the runtime performance?

  1. (a) AWO

  2. (b) FASTSRT

  3. (c) RENT

  4. (d) All of the above


Correct Option: D
- Hide questions