int res = ‘A’;
 What is the value of res?

1 Answer

Answer :

Ans. res will hold the ASCII value of ‘A’ which is 65.

Related questions

Description : If int y = 10 then find int z = (++y * (y++ + 5));

Last Answer : Ans. Increment operator has the highest precedence. So, ++y and y++ will be evaluated starting from left. In ++y, the value of y will be incremented to 11 and then 11 will be used in the expression. When y++ is evaluated, the current ... int z = (++y * (y++ + 5)); = 11 * (11 + 5 ) = 11 * 16 = 176

Description : What are the types of casting shown by the following examples: (i) char c = (char)120; (ii) int x = ‘t’;

Last Answer : Ans. (i) Explicit casting (ii) Implicit casting

Description : Classify the following as primitive or non-primitive data types: (i) char (ii) arrays (iii) int (iv) classes

Last Answer : Ans. (i) char – Primitive (ii) arrays – Non primitive (iii) int – Primitive (iv) Classes – Non primitive

Description : If the value of basic = 1500, what will be the value of tax after the following statement is executed tax = basic > 1200 ? 200 : 100

Last Answer : Ans. 200

Description : Name any two library packages.

Last Answer : Ans. java.util, java.io

Description : Write one difference between / and % operator.

Last Answer : Ans. / is division operator while % is modulus operator which gives the remainder on dividing two numbers.

Description : Name the operators listed below i) < ii) ++ iii) && iv) ?:

Last Answer : Ans. i) Less than comparison operator ii) Increment operator iii) And logical operator iv) Ternary operator

Description : Write the output for the following: System.out.println(“Incredible” + “\n” + “world”);

Last Answer : Incredible world

Description : System.out.print(“BEST “); System.out.println(“OF LUCK”); Choose the correct option for the output of the above statements: (i) BEST OF LUCK (ii) BEST OF LUCK

Last Answer : Ans. (i) is the correct output. System.out.print() does not add a new line at the end because of which ‘OF LUCK’ gets printed on the same line as ‘BEST’.

Description : What is meant by a package.Give an example

Last Answer : Ans. Package in Java is a mechanism to encapsulate a group of classes, sub packages and interfaces., examples : lang , io , util etc..

Description : Write a difference between Unary and Binary Operator

Last Answer : Ans. Operators that acts on one operand are referred to as Unary Operators while Binary Operators acts upon two operand Unary + or Unary – , increment/decrement are the example of Unary operator While binary operator +,-,*,/ and % are the example of binary operators , (+) adds values of its operands

Description : S.J. Res. 6, the "anti-net neutrality" bill was defeated in the Senate yesterday, in a purely partisan vote. Democrats and independents against; Republicans for. Who was right?

Last Answer : answer:Democrats and Independents were right. The Internet was developed by public funding and is in the public commons. It is a vital resource to unite the world and for ideas to be debated and ... the corporate moguls that fund them, and against the 99%. Guess who are really the class warriors.

Description : Anyone know where I can source a high RES pic of twitter founder biz stone?

Last Answer : answer:You might want to check his public Flickr photos. Why, might I ask, are you looking for photos of Biz?

Description : Hi-Def/Hi-Res screen required for HD editing?

Last Answer : the 24in imac will give you a resolution of 1920×1200 which is greater than Blu Ray/1080P. The 20in models are 1680×1050, which really isn’t too far off. If you wanted to, you could attach a 24in monitor to the iMac and run video to it’s fullest resolution on it.

Description : The temperature coefficient of copper is `0.004^(@)C^(-1)`. Find the resistance of a 5 m long copper wire of diameter 0.2 mm at `100^(@)C`, if the res

Last Answer : The temperature coefficient of copper is `0.004^(@)C^(-1)`. Find the resistance of a 5 m long copper wire of ... `0^(@)C` is `1.7xx10^(-8) Omega` m.

Description : What is one effect that an in media's res opening is meant to have on the reader?

Last Answer : the reader is meant to feel the tension of the conflict immediately- apex 2021

Description : The facts though not in issue are so connected with fact in issue as to form part of  same transaction are a) Relevant under rule of res jestae b) Not relevant c) Hear say evidence d) Primary evidence

Last Answer : a) Relevant under rule of res jestae

Description : Like New Pr Like New Products w oducts wants to i ants to improve its pack ve its packaging aft aging after readi er reading custo ng customer res mer responses t ponses to its customer its ... brand mark. It contains the brand mark. c. It protects children. d. It determines product quality.

Last Answer : d. It determines product quality.

Description : Arrange the following primitive data types in an ascending order of their size: (i) char (ii) byte (iii) double (iv) int

Last Answer : Ans. The sizes of the given data types are as follows char = 2 bytes byte = 1 byte double = 8 bytes int = 4 bytes Arranging them in ascending order gives byte < char < int < double

Description : What are the default values of the primitive datatypes int and float?

Last Answer : Ans. The default value of int is 0 and the default value of float is 0.0f.

Description : State the number of bytes occupied by char and int data types.

Last Answer : Ans. char occupies two bytes and int occupied 4 bytes.

Description : Classify the following as primitive or non-primitive data types: (i) char (ii) arrays (iii) int (iv) classes

Last Answer : Ans. (i) char – Primitive (ii) arrays – Non primitive (iii) int – Primitive (iv) Classes – Non primitive

Description : Assume that variable x resides at memory location 1234, y at 1111 and p at 2222. Int x=1, y=2, *p; p=&x; y=*p; What will be the value of y after execution of above code? A) 2 B) 1 C) 1234 D) 1111

Last Answer : C) 1234

Description : int[ ] ={5,6,7,8,9} What is the value of a[3]? A) 9 B) 8 C) 7 D) 6

Last Answer : B) 8

Description : When the following code is executed what will be the value of x and y? int x = 1, y=0; y = x++; (A) 2, 1 (B) 2, 2 (C) 1, 1 (D) 1, 2

Last Answer : (A) 2, 1

Description : The correct way to round off a floating number x to an integer value is (A) y = (int)(x+0.5) (B) y = int(x+0.5) (C) y = (int)x+0.5 (D) y = (int)((int)x+0.5)

Last Answer : (A) y = (int)(x+0.5)

Description : What is the value returned by the function f given below when n = 100 ? int f(int n)  { if (n==0) then return n;  else return n + f(n-2);  } (A) 2550 (B) 2556 (C) 5220 (D) 5520

Last Answer : (A) 2550