programming languages Online Quiz - 130
Description: programming languages Online Quiz - 130 | |
Number of Questions: 20 | |
Created by: Aliensbrain Bot | |
Tags: programming languages |
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?
-
AT USER-COMMAND
-
AT PFn
-
AT SELECTION-SCREEN
-
END-OF-SELECTION
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.
The complete technical definition of a table field is determined by the field's:
-
Domain
-
Field name
-
Data type
-
Data element
AI Explanation
To answer this question, you need to understand the concept of a table field and its components.
A table field is a column in a database table that stores specific types of data. It represents a single attribute or characteristic of the entities being stored in the table. Each field in a table has certain properties that define its behavior and characteristics.
Let's go through each option to understand why it is correct or incorrect:
Option A) Domain - This option is correct because the complete technical definition of a table field is determined by the field's domain. A domain defines the data type, length, and other attributes of a field. It provides a set of allowable values and constraints for the field.
Option B) Field name - This option is incorrect. While the field name is an important component of a table field, it does not determine the complete technical definition of the field. The field name is simply a label that identifies the field within the table.
Option C) Data type - This option is incorrect. The data type is another important component of a table field, but it alone does not determine the complete technical definition of the field. The data type specifies the kind of data that can be stored in the field, such as integer, string, date, etc.
Option D) Data element - This option is incorrect. A data element is a higher-level concept that is used to define and describe a field. It includes information such as the field name, data type, length, and other attributes. However, it is not the field's data element that determines the complete technical definition of the field.
The correct answer is A) Domain. This option is correct because the complete technical definition of a table field is determined by the field's domain, which includes the field's data type, length, and other attributes.
The ABAP statement below indicates that the program should continue with the next line of code if the internal table itab:CHECK NOT itab[] IS INITIAL.
-
Contains no rows
-
Contains at least one row
-
Has a header line
-
Has an empty header line
n regard to SET PF-STATUS, you can deactivate unwanted function codes by using ____.
-
EXCLUDING
-
IMMEDIATELY
-
WITHOUT
-
HIDE
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.
What happens if message E046 is raised? At Selection-Screen on sales. If sales-low < 500. Message E046. Endif.
-
The initialization event is fired again
-
Field Sales is open for input and all other fields are not available for input
-
All fields are open for input and cursor is positioned on field sales
-
The program ends
AI Explanation
To answer this question, let's analyze each option:
Option A) The initialization event is fired again - This option is incorrect because the initialization event is only fired once at the start of the program execution.
Option B) Field Sales is open for input and all other fields are not available for input - This option is correct. When message E046 is raised, it is treated as an error message. This means that the field "Sales" will remain open for input, allowing the user to enter a value, while all other fields on the selection screen will be disabled and not available for input.
Option C) All fields are open for input and the cursor is positioned on field sales - This option is incorrect. When message E046 is raised, the cursor will not automatically be positioned on the field "Sales". It will remain at its current position.
Option D) The program ends - This option is incorrect. When message E046 is raised, the program does not immediately end. It will continue execution, but with the behavior described in option B.
Therefore, the correct answer is B) Field Sales is open for input and all other fields are not available for input.
Which of the following is not a component of control break processing when looping at an internal table?
-
AT START OF
-
AT FIRST
-
AT LAST
-
AT NEW
AI Explanation
To answer this question, we need to understand the concept of control break processing when looping at an internal table.
Control break processing is a technique used to group and summarize data within a loop. It involves identifying changes in key fields and performing specific actions when these changes occur.
Let's go through each option to understand why it is correct or incorrect:
Option A) AT START OF - This option is incorrect because "AT START OF" is a component of control break processing. It is used to perform specific actions at the start of a new group or section.
Option B) AT FIRST - This option is correct because "AT FIRST" is not a component of control break processing. It is used to perform specific actions only for the first record in the loop.
Option C) AT LAST - This option is incorrect because "AT LAST" is a component of control break processing. It is used to perform specific actions at the end of a group or section.
Option D) AT NEW - This option is incorrect because "AT NEW" is a component of control break processing. It is used to perform specific actions when there is a change in the key fields.
The correct answer is Option B) AT FIRST. This option is not a component of control break processing.
The AT USER-COMMAND event is triggered by functions defined in the ____.
-
Screen painter
-
ABAP report
-
Menu painter status
-
ABAP Dictionary
To solve this question, the user needs to be familiar with SAP programming and the different components of SAP GUI.
The AT USER-COMMAND event is used in SAP programming to handle user input for custom toolbar buttons. When a user clicks on a custom toolbar button, the AT USER-COMMAND event is triggered, and the corresponding function code is executed.
Now, let's go through each option and explain why it is right or wrong:
A. Screen painter: This option is incorrect because the screen painter is used to design the layout and appearance of SAP GUI screens. It does not define the functions that are executed when a user clicks on a custom toolbar button.
B. ABAP report: This option is incorrect because ABAP reports are used to generate reports or lists of data in SAP. They do not define the functions that are executed when a user clicks on a custom toolbar button.
C. Menu painter status: This option is incorrect because the menu painter is used to design the menus and menu bars in SAP GUI screens. It does not define the functions that are executed when a user clicks on a custom toolbar button.
D. ABAP Dictionary: This option is incorrect because the ABAP Dictionary is used to define and manage database objects in SAP. It does not define the functions that are executed when a user clicks on a custom toolbar button.
Therefore, the correct answer is option C. The functions that are executed when a user clicks on a custom toolbar button are defined in the Menu painter status.
PERFORM subroutine USING var. The var field is known as what type of parameter?
-
Formal
-
Actual
-
Static
-
Value
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
-
a&b
-
a&c
-
b&c
-
b&d
After a DESCRIBE TABLE statement SY-TFILL will contain
-
The number of rows in the internal table
-
The current OCCURS value
-
Zero, if the table contains one or more rows
-
The length of the internal table row structure
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.
-
True
-
False
HashMap permits null values and only one null key.
-
True
-
False
IOException is a type of checked exception.
-
True
-
False
Immutable objects are automatically thread-safe.
-
True
-
False
An object becomes eligible for Garbage Collection when there are very few threads that can access it.
-
True
-
False
There is only one way to create threads i.e. Implement the Runnable interface
-
True
-
False
this keyword can't be assigned null value
-
True
-
False
PHP is a widely used ……………. scripting language that is especially suited for web development and can be embedded into html
-
Open source general purpose
-
Proprietary general purpose
-
Open source special purpose
-
Proprietary special purpose
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
-
password
-
user ID
-
database name
-
database host
Which of the following method sends input to a script via a URL?
-
Get
-
Post
-
Both
-
None
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.