Dheeraj Mehrotra solutions for Computer Science [English] Class 12 chapter 6 - Variables and Expressions [Latest edition]
Chapters
2: Computer Hardware
3: Programming in Java (Review of Class XI Sections B and C)
4: Objects
5: Primitive Values, Wrapper Classes, Types and Casting
▶ 6: Variables and Expressions
Chapter 7: Statements and their Scope
Chapter 8: Methods
Chapter 9: Arrays and Strings in Java
Chapter 10: Recursion in Java
Chapter 11: Inheritance and Polymorphism
Chapter 12: Data Structures
Chapter 13: Complexity and Big O Notation
Chapter 14: Practical Programs (Solved and UnSolved)
![Dheeraj Mehrotra solutions for Computer Science [English] Class 12 chapter 6 - Variables and Expressions Dheeraj Mehrotra solutions for Computer Science [English] Class 12 chapter 6 - Variables and Expressions - Shaalaa.com](/images/computer-science-english-class-12_6:84b15ff614c34c1bacc1b4e62b81fcd3.jpg)
Advertisements
Advertisements
Solutions for Chapter 6: Variables and Expressions
Below listed, you can find solutions for Chapter 6 of CISCE Dheeraj Mehrotra for Computer Science [English] Class 12.
Advertisements
Dheeraj Mehrotra solutions for Computer Science [English] Class 12 6 Variables and Expressions EXERCISE [Pages 131 - 135]
Define the term Variables.
Define the term Constants.
What are Data Types?
Write about the various Data Types of Java.
Explain the int Data Type with an Example.
Explain the Floating Point data tyре.
Explain the char Data Type with an Example.
Explain the features of variables.
Explain the features of Constants.
What are the rules for naming a variable in JAVA?
Explain the various types of Variables in JAVA.
Write about the declaration of Variables in JAVA.
Define the term Initialization of Variables.
How is an assignment statement used in JAVA.
Explain the features of Constants.
What are Operators?
Explain the Various Types of Operators in Java.
Explain the various shorthand notations in JAVA.
Explain the Relation Operator with the help of an example program.
What is an Increment Operator in Java? Explain with an example.
What is a Decrement Operator in Java? Explain with an example.
What are Bitwise Operators?
Explain the Various Types of Bitwise Operators in Java.
What are ternary operators?
Explain the Syntax of the Ternary Operator with an Example Program.
Explain the various Expressions of Java.
What do you understand by Type Conversion?
Explain the term Automatic Conversion.
Explain the Utility of Automatic Conversion.
What is meant by Type Casting? Explain with the help of an example program.
What is meant by the precedence of operators?
Explain the Interpretation of Java Programs.
Explain the Compilation of Java Programs.
Explain the Linking of Java Programs.
Explain the Execution of Java Programs.
Explain Debugging of a Java Program.
What are Compiler Errors?
Explain the term Interpreter Errors.
Explain the following with an example segment:
Bitwise Characters
Explain the following with an example segment:
Escape Character
Explain the following with an example segment:
Modulus Operator
Explain the following with an example segment:
Unary Operator
Explain the Syntax of the Ternary Operator with an Example Program.
Differentiate between the following:
Constant and Variable
Differentiate between the following:
float and double
Differentiate between the following:
int and long
Differentiate between the following:
Post increment and Pre increment operator
Differentiate between the following:
Increment and Decrement operators
Explain the following operator with an example program:
Explain the following operator with an example program:
Relational Operator
Explain the following operator with an example program:
Logical Operator
Explain the following operator with an example program:
Increment & Decrement Operator
Explain the following operator with an example program:
Conditional Operator
Explain the following operator with an example program:
Unary Operator
Define the precedence of operators in Java.
What is the value of x after evaluating:
x + = x + + + - - x + 4; if x = 3,
before the evaluation?
Explain the following:
An Expression of Java
Explain the following:
Type Conversion and its forms
Explain the following:
Java Shorthands
Explain the term type casting.
Explain the following:
Type Promotion
Name the value of ((1/0.0) - (1/-0.0))?
Evaluate the following Java expression, where a, b and c are integers and d and f are floating-point numbers. The values are a = 5, b = 3 and d = 1.5.
f = a + b/a
Evaluate the following Java expression, where a, b and c are integers and d and f are floating-point numbers. The values are a = 5, b = 3 and d = 1.5.
c = d*a + b
Evaluate the following Java expression, where a, b and c are integers and d and f are floating-point numbers. The values are a = 5, b = 3 and d = 1.5.
c = (a++)*d + a
Evaluate the following Java expression, where a, b and c are integers and d and f are floating-point numbers. The values are a = 5, b = 3 and d = 1.5.
f = (++b)* b - a
Evaluate the following Java expression, where a, b and c are integers and d and f are floating-point numbers. The values are a = 5, b = 3 and d = 1.5.
c = a – (b++)*(–d)
Illustrate '?' operator.
Differentiate between the following:
Post increment and Pre increment operator
What is the meaning of variable++?
What does the following program output to the monitor:
int value = 0;
int count = 1;
value = count++;
System.out.println("value:" + value "+ count:" + count);What does the following program output to the monitor:
int value = 0;
int count = 1;
value = ++count; /* note change from previous */
System.out.println("value:" + value "+ count:" + count );What is the output of the following:
int a = 0;
int b = 10;
a =-b;
System.out.println("a:” + a + “b:" +b);What is the output of the following program:
double w = 12.5;
w*= 2;
System.out.println("w is" + w);Which of the answers does the same thing as the following:
value += sum++;
value = value + sum;sum = sum + 1;sum = sum + 1;value = value + sum;value = value + sum;value = value + ++sum;
Fill in the blank so that wages are divided by two.
wages ______ 2;
Are the auto-increment and auto-decrement operators (++ and –) an essential part of the Java language?
Which one of the following is NOT a correct arithmetic expression?
alpha
(alpha / momentum) - 12.4
alpha (/ momentum - 12.4)
((alpha / momentum) - 12.4)
What is an operand?
Assume the following declarations:
short a=12;
int b=33;
float x=2.3;
double y=3.14;
Which one of the following expressions will NOT be evaluated using double precision floating point?
a + x
1.5 + 8.6
a + b
x/y
What does the following class output?
class output
{
public void work()
{
int totalCost = 6;
int items = 12;
System.out.println("cost per item: "+ totalCost/items);
}}cost per item: .5
cost per item: 0
cost per item: 1
cost per item: +6/12
What is the result of evaluating the following expression?
(1/2 + 3.5) * 2.0
What is the result of evaluating the following expression?
–32/6
What is an expression?
What is the value of −32% 6?
What gets displayed on the screen when the following program is compiled and run. Select the one correct answer.
public class test{
public static void main(String args[]){
int x;
x = -3 >> 1;
x = x >>> 2;
x = x<<1;
System.out.println(x);
}
}What gets displayed on the screen when the following program is compiled and run. Select the one correct answer.
public class test {
public static void main(String args[]) {
int x, y;
x = 5 >> 2;
y = x>>> 2;
System.out.println(y);
}
}What gets displayed on the screen when the following program is compiled and run. Select the one correct answer.
public class test
{
public static void main(String args[])
{
boolean x = true;
int a;
if(x) a = x ? 1: 2;
else a = x? 3: 4;
System.out.println(a);
}
}If a = 12, give the value of the following expression:
a++
If a = 12, give the value of the following expression:
++a
If a = 12, give the value of the following expression:
(a++)--;
If a = 12, give the value of the following expression:
a + = 2;
If a = 12, give the value of the following expression:
a − = 10;
If a = 12, give the value of the following expression:
--a + (++a)
If a = 12, give the value of the following expression:
(a++) + (--а)
Explain the usage of the following special symbol in Java:
,(comma)
Explain the usage of the following special symbol in Java:
;(semicolon)
Explain the usage of the following special symbol in Java:
{}(braces)
Explain the usage of the following special symbol in Java:
()(simple brackets)
Explain the usage of the following special symbol in Java:
[](brackets)
Solutions for 6: Variables and Expressions
![Dheeraj Mehrotra solutions for Computer Science [English] Class 12 chapter 6 - Variables and Expressions Dheeraj Mehrotra solutions for Computer Science [English] Class 12 chapter 6 - Variables and Expressions - Shaalaa.com](/images/computer-science-english-class-12_6:84b15ff614c34c1bacc1b4e62b81fcd3.jpg)
Dheeraj Mehrotra solutions for Computer Science [English] Class 12 chapter 6 - Variables and Expressions
Shaalaa.com has the CISCE Mathematics Computer Science [English] Class 12 CISCE solutions in a manner that help students grasp basic concepts better and faster. The detailed, step-by-step solutions will help you understand the concepts better and clarify any confusion. Dheeraj Mehrotra solutions for Mathematics Computer Science [English] Class 12 CISCE 6 (Variables and Expressions) include all questions with answers and detailed explanations. This will clear students' doubts about questions and improve their application skills while preparing for board exams.
Further, we at Shaalaa.com provide such solutions so students can prepare for written exams. Dheeraj Mehrotra textbook solutions can be a core help for self-study and provide excellent self-help guidance for students.
Concepts covered in Computer Science [English] Class 12 chapter 6 Variables and Expressions are Variables as Names for Values, Expressions (Arithmetic and Logical) and Their Evaluation (Operators, Associativity, Precedence), Assignment Operation, Difference Between Left Hand Side and Right Hand Side of Assignment.
Using Dheeraj Mehrotra Computer Science [English] Class 12 solutions Variables and Expressions exercise by students is an easy way to prepare for the exams, as they involve solutions arranged chapter-wise and also page-wise. The questions involved in Dheeraj Mehrotra Solutions are essential questions that can be asked in the final exam. Maximum CISCE Computer Science [English] Class 12 students prefer Dheeraj Mehrotra Textbook Solutions to score more in exams.
Get the free view of Chapter 6, Variables and Expressions Computer Science [English] Class 12 additional questions for Mathematics Computer Science [English] Class 12 CISCE, and you can use Shaalaa.com to keep it handy for your exam preparation.
