What will be the final value of variable x after the following code is executed: -Technology

1 Answer

Answer :

The value is:1

Related questions

Description : What will be the values of i and z after the following code is executed : -Technology

Last Answer : Value of i = 10Value of z = 5

Description : What will be displayed in jTextFieldl and jTextField2 after the following code is executed : -Technology

Last Answer : OutputjTextFieldl will contain value = 12jTextField2 will contain value = 13

Description : Write Java code to assign the value 10 to variable x and store its square value in another variable y. -Technology

Last Answer : class Square{public static void main (String args [ ]){int x. y ; x = 10 : y = x * x ;

Description : Write the value that will be stored in variable a after execution of the following code if : -Technology

Last Answer : (i) Value of a = 10, if initial value of a is 8(ii) Value of a = 17, if initial value of a is 10

Description : What values will be displayed in JOptionPane when the following code is executed? -Technology

Last Answer : No value will be displayed in JOptionPane because it will give exception in thread ‘main’ due to null.

Description : What will be an output of the following code if value of variable application is 1? switch(application) -Technology

Last Answer : The output is:OS

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 : Explain with the help of an example that why should atransaction be executed as a whole or it should be not executed at all -Technology

Last Answer : A transaction is a set of changes that must be made together. It is a program unit whose execution mayor may not change the contents of a database. Transaction is executed as a single unit. ... from one bank account to another requires two changes to the database both must succeed or fail together

Description : ‘Class’ table has columns RNO and NAME. The following statements are executed: -Technology

Last Answer : Output for the 1st SELECT * FROM Class ; statement -RNONAME5Rajeev6Chris7FerozeOutput for the llnd SELECT * FROM Class; statementRNONAME5Rajeev6Chris

Description : Initially the number decimal 8 is stored. If instruction RAL is executed twice, the final number stored will be: (1) Decimals 8 (2) Decimal 16 (3) Decimal 32 (4) Decimal 2 

Last Answer : Initially the number decimal 8 is stored. If instruction RAL is executed twice, the final number stored will be: Decimal 32

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 : The mechanism which changes the value of manipulated variable in response to the output signal from the control unit is called the (A) Final control element (B) On-off control (C) Floating control action (D) None of these

Last Answer : Option A

Description : If a variable is declared final, it must include ...................... value. A) integer B) no C) initial D) float

Last Answer : C) initial

Description : There are three processes P1, P2 and P3 sharing a semaphore for synchronising a variable. Initial value of semaphore is one. Assume that negative value of semaphore tells us how many processes are waiting in queue. Processes access ... The final value of semaphore will be: (1) 0 (2) 1 (3) -1 (4) -2 

Last Answer : Answer: 1

Description : ……………. are not machine instructions and therefore, Java interpreter generates machine code that can be directly executed by the machine that is running the Java program. A) Compiled Instructions B) Compiled code C) byte code D) Java mid code

Last Answer : C) byte code

Description : What is the output of the following piece of code when executed in Python shell? >>> a=("Check")*3 >>> a a) (‘Check’,’Check’,’Check’) b) * Operator not valid for tuples c) (‘CheckCheckCheck’) d) Syntax erro

Last Answer : c) (‘CheckCheckCheck’)

Description : What is the output when following code is executed ? >>>list1 = [11, 2, 23] >>>list2 = [11, 2, 2] >>>list1 < list2 is a) True b) False c) Error d) None

Last Answer : b) False

Description : What is the output when following code is executed ? names1 = ['Amir', 'Bear', 'Charlton', 'Daman'] names2 = names1 names3 = names1[:] names2[0] = 'Alice' names3[1] = 'Bob' sum = 0 for ls in (names1, names2, names3): ... if ls[1] == 'Bob': sum += 10 print sum a) 11 b) 12 c) 21 d) 22

Last Answer : d) 22

Description : What is the output when following code is executed ? >>>names = ['Amir', 'Bear', 'Charlton', 'Daman'] >>>print(names[-1][-1]) a) A b) Daman c) Error d) n

Last Answer : b) Daman

Description : What is the output when following code is executed ? >>>str1="helloworld" >>>str1[::-1] a) dlrowolleh b) hello c) world d) helloworld

Last Answer : a) dlrowolleh

Description : hat is the output when following code is executed ? >>>print r"\nhello" The output is a) a new line and hello b) \nhello c) the letter r and then hello d) error

Last Answer : d) error

Description : What is the output when following code is executed ? >>> str1 = 'hello' >>> str2 = ',' >>> str3 = 'world' >>> str1[-1:] a) olleh b) hello c) h d) o

Last Answer : b) hello

Description : A compiler is used to convert the following to object code which can be executed (A) High-level language (B) Low-level language (C) Assembly language (D) Natural language

Last Answer : (A) High-level language

Description : Ruby, a class XI student has just started learning java programming. Help her in the following: (i) Explain her the concept of variable -Technology

Last Answer : (i)Variables are named storage location to store values temporarily which can be changed during program execution.Data type states the way the values of that type are stored, the operations that can be done ... setText( Just Pass );In the above if statement, value of marks is being compared with 40.

Description : Help Manish in identifying the incorrect variable name with justification from the following: -Technology

Last Answer : I. (i)[emailprotected]; // Special symbols like '@' is not allowed in variable name(iv) avg marks;// Spaces are not allowed in variable nameII.int price;price=10;price=price*2;price=price-5;

Description : Identify the invalid variable names. State the reason if invalid. -Technology

Last Answer : Marks Unit is an invalid variable name because variable name does not allow spacing.

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 : To display (X+Y)2, correct HTML code is (a) (X+Y)2 -Technology

Last Answer : (c) (X+Y) 2 code is correct because superscript have to be placed in between and tags.

Description : Predict the output displayed in text fields named jTextField2 and jTextField3 after running the above code. -Technology

Last Answer : (i) GREEN WORLD, CLEAN WORLD76 more characters can be entered(ii)length(),toUpperCase()

Description : Find the output of the following Java code snippet after execution of each java statement labelled -Technology

Last Answer : The output is:IN5inin5

Description : A class is a variable of variable that is declared inside a class as: a) Final b) Static c) Abstract d) Extends e) None of The Above

Last Answer : b) Static

Description : What is a final variable ?

Last Answer : Final variable is a constant variable. Variable value can't be changed after instantiation.

Description : What is a Final Variable ?

Last Answer : Ans. Final variable is a variable constant that cannot be changed after initialization.

Description : Describe final variable and final method

Last Answer : Final method: making a method final ensures that the functionality defined in this method will never be altered in any way, ie a final method cannot be overridden. Syntax: final void findAverage() ... on individual objects of the class. Example of declaring final variable: final int size = 100;

Description : statement block is executed atleast once for any value of the condition. a. For statement b. Do-while statement c. While statement d. None of these

Last Answer : b. Do-while statement

Description : “Enterprises should mandate that security investments, services, and projects in the cloud are executed to achieve established business goals” is a key objective of _____________ a) Strategic Alignment b) Value Delivery c) Risk Mitigation d) Sustained Performance

Last Answer : Strategic Alignment

Description : Suppose d = { john :40, peter :45}, what happens when we try to retrieve a value using the expression d[ susan ]? a) Since susan is not a value in the set, Python raises a KeyError ... Python raises a KeyError exception d) Since susan is not a key in the set, Python raises a syntax error

Last Answer : c) Since “susan” is not a key in the set, Python raises a KeyError exception

Description : ………. reads the bar code information. -Technology

Last Answer : Barcode Reader reads the bar code information.

Description : Machine language sometimes referred to as (a) programming language that is used widely by the programmer. (b) machine code or object code -Technology

Last Answer : (b) Machine language sometimes referred to as machine code or object code because it is the language which is only understood by the computer as a computer itself is just a machine or an electronic device.

Description : Consider the following database: Product Code Product Name Date of sale QtySold Customer Name Amount -Technology

Last Answer : 1. Qty Sold and Amount fields2. ProductCode field3. Date/Time data type4. ProductCode, ProductName and CustomerName fields5. 6 fields and 5 records6. Validation Rule

Description : Write HTML code to set the image ‘Pen. jpg’ stored in ‘My Pictures’ folder in C: -Technology

Last Answer : The HTML code is .

Description : Write the extension of HTML code file. -Technology

Last Answer : The extension of HTML code file is.html or .htm

Description : What is the method of viewing the source code of the current page in the Web browser? -Technology

Last Answer : Right click on the Web page and then select View Source from the context menu.

Description : While writing HTML code, how do you find out how your Web page would look like? -Technology

Last Answer : For this, open the HTML code file in a Web browser.

Description : Identify the error(s) in the following HTML code. Also, write the correct code. -Technology

Last Answer : The error in the code is that in place of color attribute there should be bgcolor.The correct code is

Description : What is the use of tag in HTML code? Write any two options used with this tag. -Technology

Last Answer : The tag is used to change the size, color and type face of the text on HTML page. It uses attributes such as size, face etc.

Description : Identify the errors and write the correct HTML code 1. -Technology

Last Answer : 1. 2.

Description : What is the method of using comment line in the HTML code? -Technology

Last Answer : In HTML code, the comment line is declared as

Description : Write the HTML code to display horizontal line of red color. -Technology

Last Answer :

Description : Find error(s) in the following HTML code segment. Rewrite the correct code. -Technology

Last Answer : There should be type instead of style. So, correct line is