introduction to computer and java
Question 08: What language does the CPU understand?
ANS: CPU understand only binary code or machine language. Because it is native language of computer.
Question 09: What is an assembly language?.What is an assembler?
Ans:
Assembly language:
Assembly language use short descriptions words called mnemonics which is used to represent machine instruction.
Example:
For adding two numbers. add 4,9 result
Assembler:
An assembler is a software that convert assembly language into machine code.
Question 10: What is a high-level programming language?
Ans:
High level language is English like , Which is easy to understand.
The instruction given to computer is called a statement.
Example
Sum = a+b;
Question 11: What is a source program?
Ans:
The program written in high level language is called source program or source code.
Question 12: What is an interpreter? What is a compiler?
Interpreter.
An interpreter is a software that convert high level language in low level language statement by statement. It is time consuming
Compiler:
A compiler is a software that convert high level into low level language as whole.
Question 13: What is a keyword? List some Java keywords.
Keywords are reserved words that have predefine meaning and purpose.
Key words:byte , short , int , float , char , String ,Boolean , etc.
Question 14: Show the output of the following code:
public class Test {
public static void main(String[] args) {
System.out.println("3.5 * 4 / 2 – 2.5 is ");
System.out.println(3.5 * 4 / 2 – 2.5);
}
}
Output
3.5 * 4 / 2 – 2.5 is
4. 5
Labels: theory problems
