3 radio buttons from the following code can be selected at any given time.
<u>Explanation:</u>
In any programming language end user prompts either checkbox or radio buttons.
Normally checkbox are used for end user to select true or false methods where return value will true if checkbox click or false, one or zero. It all depends how end user uses the checkbox in his or her programming languages.
Radio buttons are used to end user in the programming languages where to select one radio buttons out of given radio buttons.
Where each radio buttons are marked with own assigned values. Based upon user selecting the radio buttons return will be assigned value of selected radio button.
If select option is multiple, each category of radio button is placed in grouping.
***Correction: <em>Options of the question have mistakes in them. The correct options are given in the comment section under the question above</em>***
Answer:
The correct answer is Option (1) three_com
Explanation:
There are a few rules you need to keep in mind while naming any variable, which are as follows:
- The first letter of any variable name should be either a letter of an alphabet or an underscore. For example, helloWorld or _helloWorld.
- No special characters (except underscore obviously) or spaces in between the name are allowed. For example, <em>hello&world</em> or <em>hello world</em> are not valid names.
- The first letter of the variable name should not be a number.
Now look at all the options given:
Option-1 (three_com): The name starts with the letter <em>t</em> of an alphabet and there are no spaces or special characters in it except an <em>underscore</em> (which is acceptable). Therefore, this option is correct.
Option-2 (3com): The name starts with a number. Not allowed.
Option-3 (3_com): The name starts with a number. Not allowed.
Option-4 (ampersand&): The name has a special character <em>&</em> in it, which is not allowed as per the aforementioned rules.
Hence, the correct answer is option (1) <em>three_com</em>.
Answer:
The program to this question can be given as:
Program:
#include <stdio.h> //include header file.
int main() //defining main method
{
char i,j; //defining variable
for (i='a'; i<='e'; i++) //outer loop for column
{
for (j='a'; j<='e'; j++) //inner loop for row
{
printf("%c%c\n",i,j); //print value
}
}
return 0;
}
Output:
image.
Explanation:
- In the above C language program, firstly a header file is included. Then the main method is defined in this, a method contains a char variable that is "i and j". This variable is used in for loop, that is used to print the pattern.
- To print the following patter two for loop is used the outer loop is used for print columns and the inner loop prints row.
- In C language to print character, we use "%c" inside a loop print function is used, that prints characters.
Answer:
2.As the name defines that over-the-shoulder perspective, this is the camera position where the viewer can see the front view of the game, like this position is from the back or from the shoulder’s so the player can easily judge the game and play the game easily. So this position is very popular in the games. Furthermore, if we talk about this position according to the first person, this is the same like you are watching from the player’s eye and this makes the game more attention seeker for the player and also those who are watching the game. Likewise, the second person is not much important in the game because this is not controlled by the player but the second person is focused on the player’s action, so the camera position is much less important for the second person. Similarly, the third person is more important than the second person. The third person usually practical consideration like this makes the situation clearer and easier for the player and draws a very clear picture to everyone.
3.When you are talking about the games and building a very interactive game, then this is very important that the game should have some logic and goals. Without a goal and illogic games not lasts a good thought. Catch up mechanics specifically use to define some kind of rewards and goals in the game that will be helpful for the player. Similarly, the single-player games are more interactive as compared to the multi-player because multi-player involve many other people who will be not accepted easily. I catch up mechanics involved in the single-player then this does not mean that you are giving a chance again to win instead to end the game quickly. While using the AI in games for both types, this will give a much higher interactive level and entertaining level. Not every player can take the difficulty level that can be offered after the AI, but after combining the AI with the catch-up mechanics, the game level becomes higher with every perspective.
:)
Answer:
e) Code segment II produces correct output for all values of str, but code segment I produces correct output only for values of str that contain "pea" but not "pear".
Explanation:
<em>if - elseif - else statements work in sequence in which they are written. </em>
- <em> </em>In case <em>if() statement is true, </em>else if() and else statements will not get executed.
- In case <em>else if() statement is true</em>, conditions in if() and else if() will be checked and else statement will not be executed.
- In case <em>if() and else if() both are false</em>, else statement will be executed<em>.</em>
First, let us consider code segment I.
In this, first of all "pea" is checked in if() statement which will look for "pea" only in the String str. So, even if "pearl" or "pear" or "pea" is present in 'str' the result will be true and "pea" will get printed always.
After that there are else if() and else statements which will not get executed because if() statement was already true. As a result else if() and else statements will be skipped.
Now, let us consider code segment II.
In this, "pearl" is checked in if() condition, so it will result in desired output.
Executable code is attached hereby.
Correct option is (e).
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark">
java
</span>
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark">
java
</span>