0

programming languages Online Quiz - 130

Description: programming languages Online Quiz - 130
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0

Assuming a pushbutton with function code 'FUNC' is available in the toolbar of a list report, what event is processed when the button is clicked?

  1. AT USER-COMMAND

  2. AT PFn

  3. AT SELECTION-SCREEN

  4. END-OF-SELECTION


Correct Option: A

AI Explanation

To answer this question, you need to understand the different events that can be triggered in a list report.

Option A) AT USER-COMMAND - This option is correct because the AT USER-COMMAND event is processed when a pushbutton with function code is clicked. This event allows you to define the logic that should be executed when the button is clicked.

Option B) AT PFn - This option is incorrect because the AT PFn event is used for function keys (such as F1, F2, etc.) on the keyboard, not for pushbuttons.

Option C) AT SELECTION-SCREEN - This option is incorrect because the AT SELECTION-SCREEN event is triggered when the selection screen is displayed, not when a pushbutton is clicked.

Option D) END-OF-SELECTION - This option is incorrect because the END-OF-SELECTION event is triggered at the end of the selection process, not when a pushbutton is clicked.

The correct answer is A) AT USER-COMMAND. This option is correct because the AT USER-COMMAND event is processed when a pushbutton with function code is clicked.

n regard to SET PF-STATUS, you can deactivate unwanted function codes by using ____.

  1. EXCLUDING

  2. IMMEDIATELY

  3. WITHOUT

  4. HIDE


Correct Option: A

AI Explanation

To answer this question, you need to understand the functionality of the SET PF-STATUS statement in ABAP programming.

The SET PF-STATUS statement is used to set the program function status (PF-STATUS) for a screen. PF-STATUS is a collection of function codes that are displayed on the status bar of a screen. These function codes allow the user to interact with the screen by executing specific actions.

To deactivate unwanted function codes from the PF-STATUS, you can use the EXCLUDING addition with the SET PF-STATUS statement.

Option A) EXCLUDING - This option is correct because the EXCLUDING addition is used to exclude specific function codes from the PF-STATUS. By specifying the function codes to be excluded, you can deactivate them and prevent them from being displayed on the status bar.

Option B) IMMEDIATELY - This option is incorrect because the IMMEDIATELY addition is used to set the PF-STATUS immediately without waiting for the next screen event. It does not control the deactivation of unwanted function codes.

Option C) WITHOUT - This option is incorrect because the WITHOUT addition is not used to deactivate or exclude function codes from the PF-STATUS. It is used to specify additional attributes or settings for the SET PF-STATUS statement.

Option D) HIDE - This option is incorrect because the HIDE addition is not used to deactivate or exclude function codes from the PF-STATUS. It is used to hide specific function codes from the status bar without deactivating them.

The correct answer is A) EXCLUDING. This option is correct because it allows you to deactivate unwanted function codes by excluding them from the PF-STATUS.

  1. The initialization event is fired again

  2. Field Sales is open for input and all other fields are not available for input

  3. All fields are open for input and cursor is positioned on field sales

  4. The program ends


Correct Option: B

The AT USER-COMMAND event is triggered by functions defined in the ____.

  1. Screen painter

  2. ABAP report

  3. Menu painter status

  4. ABAP Dictionary


Correct Option: C

PERFORM subroutine USING var. The var field is known as what type of parameter?

  1. Formal

  2. Actual

  3. Static

  4. Value


Correct Option: B

AI Explanation

To answer this question, we need to understand the different types of parameters used in subroutines.

In this scenario, the PERFORM statement is used to call a subroutine and the keyword "USING" is used to pass a parameter to the subroutine. The parameter in question is referred to as "var".

The different types of parameters used in subroutines are:

A. Formal - A formal parameter is a placeholder in the subroutine definition that represents the data passed to the subroutine. In this case, "var" is not the placeholder in the subroutine definition, so it is not a formal parameter.

B. Actual - An actual parameter is the actual data or variable passed to the subroutine during the subroutine call. In this case, "var" is the actual parameter being passed to the subroutine, so it is an actual parameter.

C. Static - Static refers to a storage class in programming languages and is not directly related to subroutine parameters. It is not the correct answer in this context.

D. Value - Value is a term that can be used to describe different aspects of programming, but it is not specifically related to subroutine parameters. It is not the correct answer in this context.

Therefore, the correct answer is B) Actual. The var field is known as an actual parameter because it is the actual data or variable passed to the subroutine during the subroutine call.

What is true of passing by value and result in the following code? More than one answer is correct. Perform calculate_sales using amount. FORM calculate_sales changing value(f_amount) a) Formal Parameter f_amount is allocated it’s own memory space b) The address of the actual parameter is passed to the formal parameter c) Formal parameter is copied to memory space of actual parameter at the end of the form d) Formal parameter is not copied to memory space of actual parameter

  1. a&b

  2. a&c

  3. b&c

  4. b&d


Correct Option: B

After a DESCRIBE TABLE statement SY-TFILL will contain

  1. The number of rows in the internal table

  2. The current OCCURS value

  3. Zero, if the table contains one or more rows

  4. The length of the internal table row structure


Correct Option: A

AI Explanation

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

Option A) The number of rows in the internal table - This option is correct. After a DESCRIBE TABLE statement, SY-TFILL will contain the number of rows in the internal table.

Option B) The current OCCURS value - This option is incorrect. The OCCURS value is used to define the number of occurrences of a structure or table type, and it is not related to the DESCRIBE TABLE statement.

Option C) Zero, if the table contains one or more rows - This option is incorrect. SY-TFILL will not contain zero if the table contains one or more rows. It will contain the number of rows in the internal table.

Option D) The length of the internal table row structure - This option is incorrect. The length of the internal table row structure is not stored in SY-TFILL.

The correct answer is A) The number of rows in the internal table. This option is correct because after a DESCRIBE TABLE statement, SY-TFILL will contain the number of rows in the internal table.

ArrayList is thread-safe whereas Vector is not thread-safe.

  1. True

  2. False


Correct Option: B

HashMap permits null values and only one null key.

  1. True

  2. False


Correct Option: A

IOException is a type of checked exception.

  1. True

  2. False


Correct Option: A

Immutable objects are automatically thread-safe.

  1. True

  2. False


Correct Option: A

An object becomes eligible for Garbage Collection when there are very few threads that can access it.

  1. True

  2. False


Correct Option: B

There is only one way to create threads i.e. Implement the Runnable interface

  1. True

  2. False


Correct Option: B

this keyword can't be assigned null value

  1. True

  2. False


Correct Option: A

PHP is a widely used ……………. scripting language that is especially suited for web development and can be embedded into html

  1. Open source general purpose

  2. Proprietary general purpose

  3. Open source special purpose

  4. Proprietary special purpose


Correct Option: A

AI Explanation

To answer this question, you need to understand the characteristics of PHP.

Option A) Open source general purpose - This option is correct because PHP is an open-source general-purpose scripting language. It is widely used for web development and can be embedded into HTML.

Option B) Proprietary general purpose - This option is incorrect because PHP is not a proprietary language. It is freely available and open-source.

Option C) Open source special purpose - This option is incorrect because PHP is not a special-purpose language. It is a general-purpose language that can be used for various purposes, with web development being one of its primary uses.

Option D) Proprietary special purpose - This option is incorrect because PHP is not a proprietary language, and it is not a special-purpose language.

The correct answer is A) Open source general purpose. This option is correct because PHP is an open-source scripting language that is widely used for web development and can be embedded into HTML.

mysql_connect( ) does not take following parameter

  1. password

  2. user ID

  3. database name

  4. database host


Correct Option: C

Which of the following method sends input to a script via a URL?

  1. Get

  2. Post

  3. Both

  4. None


Correct Option: A

AI Explanation

To answer this question, you need to understand the difference between the GET and POST methods in web development.

Option A) Get - This option is correct because the GET method is used to send input to a script via a URL. When using the GET method, the data is appended to the URL as query parameters. This method is commonly used for retrieving data or requesting information from a server.

Option B) Post - This option is incorrect because the POST method is used to send data to the server as part of the request body, rather than appending it to the URL. The POST method is commonly used for submitting data to a server, such as when submitting a form.

Option C) Both - This option is incorrect because although both the GET and POST methods can be used to send input to a script, the question specifically asks for the method that sends input via a URL, which is the GET method.

Option D) None - This option is incorrect because the GET method does send input to a script via a URL, as explained above.

The correct answer is Option A) Get. This option is correct because the GET method is used to send input to a script via a URL.

- Hide questions