Wednesday, June 26, 2013

Networking MCQ Test – 2


Que.1. A network router joins two _________ together?
A:        Computers
B:        Switches
C:        Networks
D:        Gateway

Right Answer: C

Que.2. What is the other types of OLAP apart from ROLAP?
A:        HOLAP
B:        MOLAP
C:        DOLAP
D:        Both a and b above

Right Answer: B

Que.3. ____________ assigns a unique number to each IP network adapter called the MAC address.
A:        Media Access Control
B:        Metro Access Control
C:        Metropolitan Access Control
D:        Both b and c above

Right Answer: A

Que.4. What is the full form of CAN?
A:        Campus Area Network
B:        Cluster Area Network
C:        Control Area network
D:        both a and b

Right Answer: D

Que.5. Dynamic addressing doesn't allow many devices to share limited address space on a network
A:        True
B:        False

Right Answer: B

Que.6. ARP works on Ethernet networks.
A:        False
B:        True

Right Answer: B

Que.7. __________ is a standard suite of protocols used for packet switching across computer networks.
A:        x.22
B:        x.23
C:        x.25
D:        x.26

Right Answer: C

Que.8. NAT stands for
A:        network address transformer
B:        network address translator
C:        network address translation
D:        Both b and c above

Right Answer: C

Que.9. Piconets in blue tooth a minimum of two and a maximum of ____________ Bluetooth peer devices.
A:        five
B:        eight
C:        nine
D:        four

Right Answer: B

Que.10. Which of the following below is/are capability of ICMP protocol?
A:        Report package count
B:        Report network congestion
C:        Both b and d
D:        Report availability of remote hosts

Right Answer: C

Que.11. What is the full form of URL?
A:        Uniform routing locator
B:        Uniform Resource locator
C:        Universal Resource locator
D:        Uniform router locator

Right Answer: B

Que.12. The process of assigning IP address for specific times to the various hosts by DHCP is called as?
A:        Lend
B:        sublease
C:        let
D:        Lease

Right Answer: D

Que.13. In 10base2, 10base5, what does 2 and 5 stand for?
A:        Speed in mbps
B:        Number of segments
C:        Length of segment
D:        Size of segment

Right Answer: B

Que.14. Which of the following below are secure VPN protocols?
A:        UDP
B:        TCP
C:        SSTP
D:        Both b and c

Right Answer: D

Que.15. Which of the following below is a loop back IP address?
A:        127.0.0.0
B:        127.0.1.1
C:        127.0.1.0
D:        127.0.0.1

Right Answer: D

Que.16. 10Base5, 10Base2, 10BaseT are types of?
A:        Internet
B:        LAN
C:        Ethernet
D:        Cables

Right Answer: C

Que.17. When computers in a network listen and receive the signal, it is termed as active toplogy
A:        True
B:        False

Right Answer: A

Que.18. Which of the following is true for secure shell tunneling?
A:        To set up an SSH tunnel, one configures an SSH client to forward a specified local port
B:        SSH tunnels provide a means to not bypass firewalls
C:        All SSH clients support dynamic port forwarding
D:        Both a and b

Right Answer: A

Que.19. Message Oriented Middleware allows general purpose messages to be exchanged in a Client/Server system using message queues.
A:        True
B:        False, it works based on stacks

Right Answer: A

Que.20. What is the difference between a switch and a hub?
A:        Switches operate at physical layer while hubs operate at data link layer
B:        Switches operate at data link layer while hubs operate at transport layer
C:        Switches operate at data link layer while hubs operate at physical layer
D:        Switches operate at transport layer while hubs operate at physical layer

Right Answer: C

SQL Server MCQ Test – 2


Que.1. Which feature converts row data to column for better analytical view?
A:    Views
B:    Join
C:    Pivot
D:    Trigger

Right Answer: C

Que.2. Which of the following statements is/are not true for SQL profiler?
A:    enables you to monitor events
B:    check if rows are being inserted properly
C:    check the performance of a stored procedure
D:    ALL

Right Answer: C

Que.3. Which global variables can be used to determine if a transaction is still open?
A:    @@NESTLEVEL
B:    @@FETCH_STATUS
C:    @@TRANCOUNT
D:    @@CONNECTIONS

Right Answer: C

Que.4. Which statement is used to define a cursor?
A:    OPEN
B:    FETCH
C:    DECLARE CURSOR
D:    @@FETCH_STATUS

Right Answer: C

Que.5. What is the default "SORT" order for a SQL?
A:    Ascending
B:    Descending

Right Answer: A

Que.6. Capabilities of RAISERROR
A:    It can be logged in the error log
B:    It can print a message to the application
C:    It can assign an error number, state and severity
D:    a,b and c

Right Answer: D

Que.7. How inserting data through stored procedure do reduces network traffic and increase database performance?
A:    Stored procedure can accept parameter
B:    Permission check is not required
C:    The execution plan is stored in the cache after it was executed the first time.

Right Answer: C

Que.8. Stored procedures are safe from SQL injection attacks
A:    True
B:    False

Right Answer: A

Que.9. Which of the following connection type supports application role permissions and password encryption?
A:    OLE DB
B:    DBLib
C:    ODBC
D:    OLE DB and ODBC

Right Answer: D

Que.10. Cursor that reflects the changes made to the database table even after the result set is returned
A:    Static
B:    Dynamic
C:    FORWARD_ONLY
D:    Keyset

Right Answer: B

Que.11. Which of the following is/are false for RAW mode of FOR XML?
A:    XMLSCHEMA option does not returns an in-line XSD schema.
B:    BINARY BASE32 returns the binary data in base32-encoded format.
C:    Each row in the query result is transformed into an XML element
D:    Both a and b above

Right Answer: D

Que.12. Which statement is correct from partitioned view?
A:    We cannot create an indexed view on a partitioned view
B:    We can create an indexed view on a partitioned view as long as the index is clustered
C:    We can create an indexed view on a partitioned view

Right Answer: C

Que.13. ___________ refers to the ability of the system to recover committed transaction updates if either the system or the storage media fails
A:    Isolation
B:    Atomicity
C:    Consistency
D:    Durability

Right Answer: D

Que.14. Which utilities can we used to export data from sql server to a text file?
A:    DTS export wizard
B:    BCP
C:    ISQL
D:    a and b

Right Answer: D

Que.15. You have a column that will only contain values from 0 to 256. What is the most economical data type to use for the column?
A:    TINYINT
B:    SMALLINT
C:    INT
D:    DECIMAL(1)

Right Answer: B

Que.16. Difference between UNION and UNION ALL.
A:    Both are similar
B:    UNION ALL is no longer supported in sql server 2000 onward
C:    UNION returns only unique records from both tables. UNION ALL returns all records from both tables

Right Answer: C

Que.17. Problems occurs if we don't implement proper locking strategy
A:    Dirty reads
B:    Phantom reads
C:    Lost updates
D:    Unrepeatable reads

Right Answer: D

Que.18. Which of the following statement is used to make sql server resize the database file to its smallest possible size?
A:    DBCC SHRINKFILE
B:    DBCC SHRINKDB
C:    DBCC SQLPERF SHRINKDB

Right Answer: A

Que.19. Which of the following fixed database roles can add or remove user IDs?
A:    db_accessadmin
B:    db_securityadmin
C:    db_setupadmin
D:    db_sysadmin

Right Answer: A

Que.20. By default sql server has ___________ isolation level
A:    READ COMMITTED
B:    READ UNCOMMITTED
C:    SERIALIZABLE
D:    REPEATABLE READ

Right Answer: A

Monday, June 24, 2013

C++ MCQ Test - 2

Que.1 .  What is shallow copy?



A:            A shallow copy creates a copy of the dynamically allocated objects too.

B:            A shallow copy just copies the values of the data as they are.

C:            A shallow copy creates a copy of the statically allocated objects too

D:            Both b and c above



Right Answer: B



Que.2 .  An abstract class can be instantiated.



A:            True

B:            False



Right Answer: B



Que.3 .  Which of the following below can perform conversions between pointers to related classes?



A:            cast_static

B:            dynamic_cast

C:            static_cast

D:            cast_dynamic



Right Answer: C



Que.4 .  Can #define accept parameters?



A:            Yes

B:            No



Right Answer: A



Que.5 .  What is the difference between overloaded functions and overridden functions?



A:            Overloading is a dynamic or run-time binding and Overriding is static or compile-time binding

B:            Redefining a function in a friend class is called function overriding while Redefining a function in a derived class is called a overloaded fucntion.

C:            Overloading is a static or compile-time binding and Overriding is dynamic or run-time binding

D:            Redefining a function in a friend class is called function overloading while Redefining a function in a derived class is called as overridden fucnion.



Right Answer: C



Que.6 .  How do we define a destructor?



A:            X~() {}

B:            X() {}~

C:            X() ~{}

D:            ~X() {}



Right Answer: D



Que.7 .  Which classes allow primitive types to be accessed as objects?



A:            Storage

B:            Virtual

C:            Friend

D:            Wrapper



Right Answer: D



Que.8 .  Can constructors be overloaded?



A:            No

B:            Yes



Right Answer: B



Que.9 .  #if or #elif can be used to evaluate



A:            Constant expressions

B:            Macro expressions

C:            Both a and b

D:            All expressions



Right Answer: C



Que.10 .  The default access level assigned to members of a class is ___________



A:            Private

B:            Public

C:            Protected

D:            Needs to be assigned



Right Answer: A



Que.11 .  Which type of casting can be used only with pointers and references to objects?



A:            Dynamic_cast

B:            cast

C:            Static_cast

D:            Pointer_Cast



Right Answer: A

Que.12 .  Which of the following below is /are a valid iterator type?



A:            Input Iterator

B:            Backward Iterator

C:            Forward Iterator

D:            Both a and c above



Right Answer: D



Que.13 .  Which of the following is not a standard exception built in C++.



A:            std::bad_creat

B:            std::bad_alloc

C:            std::bad_cast

D:            std::bad_typeid



Right Answer: A



Que.14 .  Every class has at least one constructor function, even when none is declared.

A:            True

B:            False

Right Answer: A

Que.15 .  Which of the following is not a valid conditional inclusions in preprocessor directives

A:            #ifdef

B:            #ifundef

C:            #endif

D:            #elif

Right Answer: B

Que.16 .  In C++ two different functions can have the same name if their parameter types are same.

A:            True

B:            False

Right Answer: B

Que.17 .  Which of the following operators below allow to define the member functions of a class outside the class?

A:            ::

B:            ?

C:            :?

D:            %



Right Answer: A

Que.18 .  Inline functions are invoked at the time of


A:            Run time

B:            Compile time

C:            Depends on how it is invoked

D:            Both b and c above



Right Answer: B



Que.19 .  For which type of class private and protected members of the class can be accessed from outside the same class in which they are declared



A:            No such class exist

B:            Friend

C:            Static

D:            Virtual



Right Answer: B


Que.20 .  What is reinterpret_cast used for?


A:            converts integer pointer type to any other integer pointer type

B:            Converts any pointer type to any other pointer type

C:            converts any pointer type to only integer pointer type

D:            Both a and b


Right Answer: D


C MCQ Test - 2

Que.1 .  va_list is an array that holds information needed by va_arg and va_end

A: null

B: null

C: null

D: null



Right Answer: A



Que.2. Point out the error in the following program.

#include<stdio.h>

#include<stdarg.h> void varfun(int n, ...); int main()

{

varfun(3,7, -11.2,0.66);

return 0;

}

void varfun( int n, ...)

{

float *ptr; int num; va_start(ptr, n);

num = va_arg(ptr, int);

printf("%d", num);

}



A: null

B: null

C: null

D: null



Right Answer: C



Que.3. What is the output of the program?

typedef struct data;

{

int x;

sdata *b;

}sdata;



A: stdio.h

B: stdarg.h

C: Error: too many parameters

D: Error: invalid access to list member



Right Answer: A



Que.4. How do we declare a float pointer?



A: float *ptr;

B: float ptr;

C: *float ptr;

D: None of the above



Right Answer: A



Que.5. Which of the following errors would be reported by the compiler on compiling the program given below?

#include<stdio.h>

int main()

{

int a =5;

switch(a)

{

case 1: printf("First"); case 2: printf("Second"); case 3 + 2: printf("Third"); case 5 : printf("Final"); break;

}

return 0;

}



There is no

A: break statement in each case. Expression as in

B: case 3 + 2 is not allowed. Duplicate case

C: case 5:

D: No error will be reported.



Right Answer: C



Que.6. Which header file should you include, if you are going to develop a function, which can accept variable number of arguments?



Error: ptr must be type of

A:va_list

B: No error

C: True

D: False



Right Answer: D



Que.7. What will be the output of the program?

#include<stdio.h>

int main()

{

int i=2;

printf("%d, %d", ++i, ++i);

return 0;

}



A: 3, 4

B: 4, 3

C: 4, 4

D: Output may vary from compiler to compiler



Right Answer: D



Que.8. How many times the while loop will get executed if a short int is 2 byte wide?

#include<stdio.h>

int main()

{

int j=1;

while(j <= 255)

{

printf("%c %d", j, j);

j++;

}

return 0 ;

}



A: Infinite times

B: 255 times

C: 256 times

D: 254 times



Right Answer: B



Que.9. When an Array passed as an argument to a function, it is interpreted as



A: Number of element of the array

B: Address of the array

C: Address of the first element of the array

D: Values of the first elements of the array



Right Answer: C



Que.10 .  Point out the error, if any in the program.

#include<stdio.h>

int main()

{

int P = 10;

switch(P)

{

case 10: printf("Case 1"); case 20: printf("Case 2"); break;

case P: printf("Case 2"); break;

}

return 0;

}



A: Error: No default value is specified Error: Constant expression required at line

B:case P: Error: There is no

C: break statement in each case.

D: No error will be reported.



Right Answer: B



Que.11. In the expression a=b=5 the order of Assignment is NOT decided by Associativity of operators



A: True

B: False

1. KR Notation

C:

2. ANSI Notation

1. Pre ANSI C Notation

D:

2. KR Notation



Right Answer: B



Que.12. Output of the following program:

main()

{

char str[]="S65AB";

printf("%d", sizeof(str));

}



A: 7

B: 6

C: 5

D: error



Right Answer: C



Que.13. void main()

{

int i; printf("%d",i^i);

}



A: cannot compile

B: 0

C: Unexpected

D: Runtime Error



Right Answer: B



Que.14. What is the notation for following functions?

1. intf(int a,float b)

{

/* Some code */

}

2. int f(a, b)int a;float b;

{

/* Some code */

}



1. ANSI Notation

A:

2. KR Notation

1. ANSI Notation

B:

2. Pre ANSI Notation

C: Infinite times

D: 32767 times



Right Answer: C



Que.15. Which of the following statement is correct about the program?

#include<stdio.h>

int main()

{

FILE *fp; char ch; int i= 1;

fp = fopen("myfile.c","r");

while((ch=getc(fp))!=EOF)

{

if (ch == )

i++;

} fclose(fp); return 0;

}



A: True

B: False

C: 12400

D: 12480



Right Answer: D



Que.16. Bit fields CANNOT be used in union. ?

A: The code counts number of characters in the file

B: The code counts number of words in the file

C: The code counts number of blank lines in the file

D: The code counts number of lines in the file



Right Answer: B



Que.17.  How many times the program will print "HelloWorld" ?

#include<stdio.h>

int main()

{ printf("IndiaBIX"); main();

return 0;

}



A: 65535 times

B: 10

C: 11

D: Till stack overflows



Right Answer: D



Que.18. What will be the output of the program?

#include<stdio.h>

#define SQR(x)(x*x)

int main()

{

int a, b=3;

a = SQR(b+2); printf("%d", a); return 0;

}



A: Error

B: Garbage value

C: True

D: False



Right Answer: B



Que.19. What will be the output of the program?

#include<stdio.h>

int main()

{

char c=48;

int i, mask=01;

for(i=1; i<=5; i++)

{

printf("%c", c|mask);

mask = mask<<1;

}

return 0;

}



A: No error

B: None of above

C: varagrg.h

D: stdlib.h



Right Answer: B



Que.20. The first argument to be supplied at command-line must always be count of total arguments



A: 12500

B: 12556

C: Error: Declaration missing ';' Error: in

D: typedef



Right Answer: B


Friday, June 21, 2013

ORACLE MCQ Test – 2

Que.1. Setting of which parameter can affect the performance of the database?
A.    Initialization parameter
B.    SGA parameter
C.    Memory Parameter
D.    Both a and b

Right Answer: C

Que.2. All of the following can ONLY be used with numeric data types except:
A.    AVG
B.    COUNT
C.    CUM
D.    STDDEV

Right Answer: B

Que.3. What is the difference between Oracle Forms and App Forms?
A.    Oracle forms runs server – side PL/SQL while app forms run client side.
B.    App forms use uses exact positioning while Oracle forms don’t.
C.    Oracle forms run client – side PL/SQL while app forms run server side.
D.    Oracle forms Flash Charts as its integrated charting engine while app forms don’t.

Right Answer: C

Que.4. Which utility is used to find version of any file?
A.    ADIDENT UTILITY   
B.    ADID UTILITY
C.    ADIDENTVER UTILITY
D.    ADIDVER UTILITY

Right Answer: A

Que.5. The IMPORT IGNORE option tells import to ignore “already exists” errors.
A.    IMPORT
B.    IGNORE
C.    Both a and b
D.    Ignore_error

Right Answer: C

Que.6. PFILE is simply a text based file.
A.    False
B.    True

Right Answer: B

Que.7. In which of the files below are parameters stored?
A.    PFILE
B.    SPFILE
C.    PARFILE
D.    Both a and b

Right Answer: D

Que.8. What happens if a tablespace clause is left off of a primary key constraint clause?

A.    This results in the index that is automatically generated being placed in then users default tablespace.
B.    This can cause serious performance problems.
C.    Both a and b
D.    There is no effect.

Right Answer:  C

Que.9. What is iAS Patch used for?
A.    To fix bugs associated with IAS_ORACLE
B.    To fix bugs associated with IAS_ ORACLE_HOME.
C.    To fix bugs associated with ORACLE_HOME
D.    To fix bugs associated with IAS_ORACLE_PATCH

Right Answer: B

Que.10. A database is a collection of logical structures of data, or schema objects.
A.    True
B.    False

Right Answer: B

Que.11. An ALL_DICTIONARY view is used for
A.    Displays all the information accessible to the current user.
B.    Displays all relevant information in the entire database.
C.    Displays all the information from the schema of the current user.
D.    All of above

Right Answer: A

Que.12. Tables in recycle bin can be resolved back into database by using.
A.    Flashback
B.    Flashback Drop
C.    Revoke
D.    Revoke_Table

Right Answer: B

Que.13. Which of the following is the root directly for oracle?
A.    ORACLE_HOME
B.    ORACLE_ROOT
C.    ORACLE_BASE
D.    ORACLE_SERVER

Right Answer: C

Que.14. What do the schema objects comprise of?
A.    Table
B.    Index
C.    Cluster
D.    All choices are correct.

Right Answer: D

Que.15. DBA_DATA_FILES is used for?
A.    Look at all data files.
B.    Look at all the characters of a data file
C.    Both b and d
D.    Look at the size of a data file.

Right Answer: D

Que.16. Which process is an instance made of?
A.    Oracle background processes
B.    Memory processes
C.    Data processes
D.    All of the above.

Right Answer: A

Que.17. Privileges are assigned to users through ______________.
A.    DBA
B.    Role
C.    Table
D.    Dictionary

Right Answer: B

Que.18. What TRUNCATE and DELETE commands does
A.    To retrieve rows in a table
B.    To remove some part of a table
C.    To get rid of all rows in a table.
D.    To recover all the rows deleted in a table.

Right Answer: C

Que.19. When a user process fails, what background process clean up after it?
A.    PCLEAN
B.    PFAIL
C.    PMON
D.    Both a and c

Right Answer: C

Que.20. What is the System Global Area.
A.    Memory area that contains data shared between all database users.
B.    Memory area that contains data shared between selected database users.
C.    Remote Memory area that contains data shared between one database users.
D.    Remote Memory area that contains data shared between all users.

Right Answer: A

HTML MCQ Test – 2

Que.1. Which of the following term describes the art of making dynamic & interactive pages?
A.    DHTML
B.     HTML
C.    XHTML
D.    XML

Right Answer: A

Que.2. <output> element represent?
A.    Authenticate the user
B.     result of a calculation
C.    pre-defines value
D.    none of these

Right Answer: B

Que.3. Attributes consist of a name and a value separated by ________ sign ?
A.    “ ”
B.     ,
C.    =
D.    ;

Right Answer: C

Que.4. Target attribute is used for
A.    opening new document
B.     selecting previous document
C.    deleting frame
D.    none of above

Right Answer: A

Que.5. Which element provides a secure way to authenticate the user?
A.    <keygen>
B.     <datalist>
C.    <output>
D.    <input>

Right Answer: A

Que.6. For defining the possible link break which tag do we have to use HTML5?
A.    <video>
B.     <track>
C.    <summary>
D.    <wbr>

Right answer: D

Que.7. DHTML is the combination of
1)      HTML
2)      javascript
3)      HTML Dom
4)      CSS

A.    1 and 2
B.     3 and 4
C.    All choices are correct
D.    none of these

Right Answer: C

Que.8. <canvas> elements is only a _________ to the graphics.
A.    component
B.     container
C.    attribute
D.    method

Right Answer: B

Que.9. terminate() method in HTML5 is used for ____________.
A.    terminate everything
B.     terminate all method
C.    terminate a web worker
D.    terminate program

Right Answer: C

Que.10. ________ property returns the url of current audio/video.
A.    currentSrc
B.     controls
C.    ended
D.    mediaGroup

Right Answer: A

Que.11. The manifest file is __________.
A.    Text file
B.     HTML file
C.    XML file
D.    java file

Right Answer: A

Que.12. Which file is used by the browser to fetch the appropriate data ?
A.    Text file
B.     HTML file
C.    XML file
D.    manifest file

Right Answer: D

Que.13. Where does web worker(s) script run?
A.    in forground
B.     in background
C.    both a and b
D.    can’t determinte

Right Answer: B

Que.14. _________ Function displays the latitude or Longitude in geoLocation in HTML5.
A.    showLocation()
B.     showPosition()
C.    both a and b
D.    showStatus()

Right Answer: B

Que.15.  Canvas is able to draw the 2D graphics using----------------
A.    XML
B.     HTML
C.    Java script
D.    XHTML

Right Answer: C

Que.16 Which storage object is used for storing the data with no expiry date?
A.    Session storage
B.     local storage
C.    mass storage
D.    stack storage

Right Answer: B

Que.17. Application cache is used for ____________
1)      offline browsing
2)      Speed
3)      Reduced server load

A.    1 and 2
B.     2 and 3
C.    All choices are correct
D.    none of these

Right Answer: C

Que.18. Seamless is a __________ type of attribute.
A.    integer
B.     Char
C.    Boolean
D.    Float

Right Answer: C

Que.19. Height attribute specifies the height of which frame?
A.    iframe
B.     jframe
C.    inline frame
D.    outline frame

Right Answer: C

Que.20. Given statement is true or false: “Web worker script is depends on other script.”
A.    Yes
B.     No

Right Answer: A

Monday, June 3, 2013

Java MCQ Test – 2

Que.1. Which of the following is not a return type?
A.    boolean
B.    void
C.    public
D.    Button

Right Answer: C

Que.2. If result = 2+3*5, what is the value and type of result variable?
A.    17, byte
B.    25, byte
C.    17, int
D.    25, int

Right Answer: C

Que.3. The inner class can access private members of the outer class.
A.    False
B.    True

Right Answer: A

Que.4. What is the data type for the number 9.6352?
A.    float
B.    double
C.    Float
D.    Double

Right Answer: B

Que.5. Which of the following statements is true?
A.    The default char data type is a space (“ ”) character.
B.    The default integer data type is int and real data type is float.
C.    The default integer data type is long and real data type is float.
D.    The default integer data type is int and real data type is double.

Right Answer: D

Que.6. What is the meaning of the return data type void?
A.    An empty memory space is returned so that the developers can utilize it.
B.    void returns no data type.
C.    void is not supported in Java.
D.    None of the above.

Right Answer: B


Que.7. What are the interfaces defined by java.lang?
A.    Cloneble
B.    Comparable
C.    Runnable
D.    a,b and c

Right Answer: D

Que.8. Does Java support multiple inheritance?
A.    No
B.    Yes

Right Answer: A

Que.9. Assume that the value 3929.92 is of type float. How to assign this value after declaring the variable interest of type float?
A.    interest = 3929.92
B.    interest = (Float)3929.92
C.    interest = 3929.92(float)
D.    interest = 3929.92f

Right Answer: D

Que.10. ____________ allow primitive data types to be accessed as objects.
A.    Both B and D.
B.    Serialized class.
C.    Primitive class.
D.    Wrapper class.

Right Answer: A

Que.11. What is the value of number after the following code fragment execution?
int number  = 0; int number2 = 12; while (number < number2) { number = number + 1; }
A.    5
B.    12
C.    21
D.    13

Right Answer: B

Que.12. Java beans have no types.
A.    True
B.    False

Right Answer: C

Que.13. __________ are utilized to control the access to an object especially in multi threaded programming.
A.    Asynchronized methods.
B.    Serialized methods.
C.    Synchronized methods.
D.    Both A and C

Right Answer: A

Que.14. What are the two parts of a value of type double?
A.    Significant, Digits, Exponent
B.    Length, Denominator
C.    Mode, Numerator

Right Answer: A

Que.15. Given the following code snippet;
int salaries[]; int index = 0; salaries = new int salaries[4]; while (index < 4) { salaries[index] =  10000; index++; } What is the value of salaries[3]?
A.    40000
B.    50000
C.    15000
D.    10000

Right Answer: D

Que.16. Which of the following statements about the Java language is true?
A.    Both procedural and OOP are supported in Java.
B.    Java supports only procedural approach towards programming.
C.    Java supports only OOP approach.
D.    None of the above.

Right Answer: A

Que.17. A lower precision can be assigned to higher precision value in Java. For exa. A byte data can be assigned to int type.
A.    True.
B.    False.

Right Answer: A

Que.18.
public class returnData
{
[returnType] getData (byte a, double z)
{
return (short)a/z * 10;
}
}
What is valid reurnType for getData?
A.    Int
B.    Byte
C.    Short
D.    Double
Right Answer: D

Que.19. After the following code fragment, what is the value in fname?
String str; int fname; str = “Foolish boy.”; fname = str.indexOf(“fool”);
A.    0
B.    2
C.    -1
D.    4

Right Answer: C

Que.20. __________ can be used to control the order of certain data structure and collection of objects too.
A.    Serial Comparators.
B.    Natural Comparators.
C.    Comparators.
D.    All of above.

Right Answer: C


JavaScript MCQ Test - 2

Que.1. Which of the following statements are false for Java Script?
A.    Variables names are not case sensitive.
B.    Variable names must begin with a letter or the underscore character.
C.    Var is used to declare a variable.
D.    Both b and c above.

Right Answer: A

Que.2. To insert a JavaScript into an HTML page, which tag is used?
A.    <script=’java’>
B.    <javascript>
C.    <script>
D.    <js>

Right Answer: C

Que.3. Javascript is an object oriented language?
A.    False
B.    True

Right Answer: B

Que.4. What language defines the behavior of a web page?
A.    HTML
B.    CSS
C.    XML
D.    Java Script

Right Answer: D

Que.5. Which of the ways below is incorrect of installing a date?
A.    new Date(dateString)
B.    new Date()
C.    new Date(seconds)
D.    new Date(year, month, day, hours, minutes, seconds, milliseconds)

Right Answer: C

Que.6. C-style block-level scoping is not supported in Java script
A.    False
B.    True

Right Answer: B

Que.7. Which of the following statements are true for Java script?
A.    JavaScript is case sensitive.
B.    JavaScript statements can be grouped together in blocks.
C.    semicolon at the end of statements is mendetory.
D.    Both a and b above.

Right Answer: D

Que.8. Which of the following is the tainted property of a window object in Java Script?
A.    Pathname
B.    Protocol
C.    Defaultstatus
D.    Host

Right Answer: C

Que.9. JavaScript ignores extra spaces.
A.    True
B.    False

Right Answer: A

Que.10. If we don’t want the script to write page content, under which HTML tag should the JS tag be placed?
A.    <body>
B.    <head>
C.    Any of a and b above
D.    Both b and c above.

Right Answer: A

Que.11. Why so Java and Java Script have similar name?
A.    Java Script is a stripped – down version of Java.
B.    The syntax of JavaScript is loosely based on Java syntax.
C.    They both support Object Oriented Programming.
D.    None of the above.

Right Answer: B

Que.12. Which of the following method is used to evaluate a string of Java Script code in the context of the specified object?
A.    Eval
B.    ParseDouble
C.    ParseObject
D.    Eflot

Right Answer: A

Que.13. Which is the correct way to write a JavaScript array?
A.    var txt = new Array(1:”arr”,2:”kim”,3:”jim”)
B.    var txt = new Array:1=(“arr”)2=(“kim”)3=(“jim”)
C.    var txt = new Array(“arr”,”kim”,”jim”)
D.    var txt = new Array=” arr ”,”kim”,”jim”
Right Answer: C

Que.14. What is negative infinity in Java script?
A.    Any of the below.
B.    number in JavaScript, derived by dividing number by negative number.
C.    number in JavaScript, derived by dividing number by zero.
D.    number in JavaScript, derived by dividing negative number by zero.

Right Answer: A

Que.15. Which of the following is not a valid JavaScript variable name?
A.    2java
B.    _java_and_java_names
C.    Javaandjava
D.    None of the above.

Right Answer: A

Que.16. ___________ JavaScript is also called client-side JavaScript.
A.    Microsoft
B.    Navigator
C.    LiveWire
D.    Native

Right Answer: B

Que.17. How to append a value to an array of Java Script?
A.    arr[arr.lenght] = value
B.    arr[arr.lenght+1] = new Arrays()
C.    arr[arr.lenght-1] = value
D.    arr[arr.lenght*1] = value

Right Answer: A

Que.18. Java script can be used for Storing the form’s content to a database file on the server.
A.    False
B.    True.

Right Answer: A

Que.19. Which of the following is used to capture all click events in window?
A.    window.captureEvents(Event.CLICK);
B.    window.routeEvents(Event.CLICK);
C.    window.handleEvents(Event.CLICK);
D.    window.raiseEvents(Event.CLICK);

Right Answer: A

Que.20. What is the event that fires when the form elements: <button>.<textarea> loses the focus?
A.    Onclick
B.    Ondblclick
C.    Onfocus
D.    Onblur

Right Answer: D