Answer:
In C++ we can assign a character to the variable by using the below statement.
ch='X';
Explanation:
The complete program for assigning a character to the variable is given as
#include<iostream>
#include <conio.h>
using namespace std;
main()
{
char ch;
ch= 'X';
cout<<"output of variable Ch ="<<ch;
getch();
}
In above program Char is the data type used for character type variables. ch= 'X' stores X in ch. Then output will shown through cout.
Answer:
The correct answer for the given question is 24
Explanation:
In the given question the value of variable i entered by the user is 25 i.e the value of i is 25 control checks the condition of if block which is false .So control moves to the else block and executed the condition inside the else block means it executed i-- decrements the value of i by 1 means i is 24
Following are the program of java :
import java.util.*;// import package
public class Main // main class
{
// main method
public static void main(String[] args)
{
int i = 0; // variable declaration
Scanner in = new Scanner(System.in); // creating class of scanner class
System.out.print("Enter a number: ");
i = in.nextInt(); // user input
if (i > 25) // check if block
{
i++; // increment the value of i
}
else
{
i--; // decrement the value of i
}
System.out.println(i); // display i
}
}
Output:
Enter a number:25
24
Answer:
Assembly language
Explanation:
Assembly language writes instructions in human letters. Every machine language instruction has a corresponding assembly language instruction that means exactly the same thing. Assembly language uses a symbolic form of a program which are capable of:
- readable by human beings (+/-)
- constants, addresses, and names of symbolic instructions
- arithmetic during assembly - calculations of addresses, constants
- synthetic instructions (not supported by our assembler)
- expansion of macroinstructions (not supported by our
assembler)
- assembly instructions (pseudo-instructions)
• memory allocation
• memory initialization
• conditional assembly (not supported by our assembler)
Answer:
A and C
Explanation:
I got the question correct on Edge.