Posts

Showing posts from August, 2014

Objective Questions of Data Structure with Answer set-6

1. .......................... is a variable that can hold the address of the variables, structure and functions that are used in the program. A) Array B) Pointer C) Structure D) None of the above 2. .................. is the organization of the data in a computers memory or in a file. A) Array B) Data Structure C) Data Management D) Data Organization 3. Which of the following is/are the advantages of using an array? i) Multi huge quantity of data items can be stored. ii) Arrays saves the memory space iii) Arrays helps to arrange the data items in particular order. iv) Data item searching is faster. A) i, ii and iii only B) ii, iii and iv only C) i, iii and iv only D) All i, ii, iii and iv 4. Some examples of data structures are i) array ii) stack iii) queue iv) binary tree v) hybrid tree A) i, ii, iii and iv only B) ii, iii, iv and v only C) i, ii, iii and v only D) All i, ii, iii, iv and v 5. Match the following components of data structure based on the concept of Abstract Data Type ...

MCQ on Core Java with Answers set-1

1. Which exception is thrown by the read( ) method of input stream class? A) Exception B) ClassNotFoundException C) read Exception D) IOException 2. What garbage collection in the context of java? A) The operating system periodically deletes all of the java files available on the system. B) Any package imported in a program and not used in automatically deleted. C) When all references to an object are gone, the memory used by the object is automatically reclaimed. D) The JVM checks the output of any Java program and deletes anything that doesn't make sense. 3. In order for a source code file, containing the public class test, to successfully compile, which of the following must be true? A) It must have a package statement B) It must be named test.java C) It must import java.lang D) It must declare a public class named test. 4. Which of the following are true about the Error and Exception classes? A) Both classes extend throwable B) The error class is final and exception class is no...

MCQ on Java Programming Language Fundamental set-12

1. A java program is first ................ and ................... A) executed, run B) compiled, run C) run, compiled D) interpreted, compiled 2. Byte code is also a ........... A) machine code B) bit code C) cryptographic code D) none 3. A private class is accessible from inside a ................. A) package B) class C) method D) none 4. Consider the statement "x=(a>b)?a:b", then the value of x is 19, if a=19 and b=12 A) true B) not supported C) false D) none of the above 5. Adapter classes are used for ............... A) code redundancy B) code reduction C) code organization D) none 6. ..................... inheritance is enable by interface in java. A) min level B) multiple C) low level D) none 7. .................... is generated if a button is clicked in AWT. A) ItemEvent B) WindowEvent C) ActionEvent D) MouseEvent 8. Using which keyword we can access value of the instance and class variables of that class inside the method of that class itself. A) super B) final C)...

MCQ on Basic SQL Queries with Answers set-1

1. DML is provided for A) Description of logical structure of database B) Addition of new structure in the database system. C) Manipulation & processing of database D) Definition of physical structure of database system 2.'AS' clause is used in SQL for A) Selection operation B) Rename Operation C) Join operation D) Projection Operation 3. Count function in SQL returns the number of A) values B) distinct values C) groups D) columns 4. The statement in SQL which allows to change the definition of a table is A) Alter B) Update C) Cteate D) Select 5. Which of the following is correct. A) A SQL query automatically eliminates duplicates B) SQL permits attribute names to be repeated in the same relation C) A SQL query will not work if there are no indexes on the relations D) None of the above 6. Which of the following operation is used if we are interested in only certain columns of a table? A) PROJECTION B) SELECTION C) UNION D) JOIN 7. Which of the following is a legal expressi...

Solved MCQ on Database Normalization set-1

1. A ..................... specifies the actions needed to remove the drawbacks in the current design of database. A) 1 NF B) 2 NF C) 3 NF D) Normal form 2. A relation is in ........................... if an attribute of a composite key is dependent on an attribute of other composite key. A) 2NF B) 3NF C) BCNF D) 1NF 3. Fifth Normal form is concerned with A) Functional dependency B) Multivalued dependency C) Join dependency D) Domain key 4. A table is in the ....................... if only candidate keys are the determinants. A) functional dependency B) transitive dependency C) 4 NF D) BCNF 5. In 2NF A) No functional dependencies exist. B) No multivalued dependencies exist. C) No partial functional dependencies exist D) No partial multivalued dependencies exist. 6. The normal form that is not necessarily dependency preserving is A) 2NF B) 3NF C) BCNF D) 4NF 7. The ................. is related to the concept of multi-valued dependency. A) fourth normal form B) fifth normal form C) boyc...

Solved MCQ on C++ Programming Language set-7

1. What is required in inheritance to initialize the data members of the base class through derived class? A) Object declaration B) Destructor C) Constructor D) Inheritance 2. In which case is it mandatory to provide a destructor in a class? A) Almost in every class B) Class for which two or more than two objects will be created C) Class for which copy constructor is defined D) Class whose objects will be created dynamically 3. Which of the statements is true in a protected derivation of a derived class from a base class? A) Private members of the base class become protected members of the derived class B) Protected members of the base class become public members of the derived class C) Public members of the base class become protected members of the derived class D) Protected derivation does not affect private and protected members of the derived class 4. When the access specifier of the base class in the derived class definition is public, the base class is .. A) Publicly inherited ...

MCQ on c++ Programming with Answers set-6

1. If a class C is derived from class B, which is derived from class A, all through public inheritance, then a class C member function can access. A) Protected and public data only in C and B B) Protected and public data only in C C) Private data in A and B D) Protected data in A and B 2. Overloading the function operator A) requires a class with an overloaded operator B) requires a class with an overloaded [ ] operator. C) allows you to create objects that act syntactically like functions. D) usually make use of a constructor that takes arguments. 3. What is a constructor? A) A function called when an instance of a class is initialized. B) A function that is called when an instance of a class is deleted. C) A special function to change the value of dynamically allocated memory D) A function that is called in order to change the value of a variable. 4. Mechanism of deriving a class from another derived class is known as ......... A) Polymorphism B) Single Inheritance C) Multilevel Inh...

Solved MCQ on C Programming Language set-5

1. What will be output of the following C program? #include int main() {int goto=5; printf("%d",goto); return 0;} A) 5 B) 10 C) ** D) compilation error 2. Output of the following C program fragment is. x=5; y=x++; printf("%d %d", x,y); A) 5, 6 B) 5, 5 C) 6, 5 D) 6, 6 3. What will be output of the following C program? #include int xyz=10; int main() { int xyz=20; printf("%d", xyz); return 0;} A) 10 B) 20 C) 30 D) compilation error 4. Following program fragment. main(){ printf("%p\n", main( ) ); } A) Prints the address of main function B) Prints 0 C) Is an error D) In an infinite loop 5. What will be output of the following program? #include int main() {int a=2, b=7, c=10; c=a==b; printf("%d",c); return 0;} A) 0 B) 7 C) 10 D) 2 6. What is the output of the following program segment? main( ) { long i=65536; printf("%d\n", i); } A) 0 B) 65536 C) -1 D) 65 7. What will be the output of the program? # include int main() {int ...

MCQ on C Programming With Answers set-4

1. 'C' is often called a .... A) Object oriented language B) High level language C) Assembly language D) Machine level language 2. Each C preprocessor directive begins with .... A) # B) include C) main() D) { 3. C allows arrays of greater than two dimensions, who will determine this? A) programmer B) compiler C) parameter D) None of the above 4. The << operator is used for A) Right shifting B) Left shifting C) Bitwise shifting D) Bitwise complement 5. Set of values of the same type, which have a single name followed by an index is called A) function B) structure C) array D) union 6. Which of the following header file is required for strcpy() function? A) String.h B) Strings.h C) file.h D) strcpy() 7. scanf() can be used for reading ... A) double character B) single character C) multiple characters D) no character 8. A variable which is visible only in the function in which it is defined is called A) Static variable B) auto variable C) external variable D) local variable ...

How to validate required field in a form using javascript

In a wave form, fields are needs to validate at the time of entry or on submission of form. Generally in a form it needs to validate user has left required fields empty or not, user has entered valid e-mail address or not, user has entered a valid date, user has entered text in a numeric field or not and other also.  Here is a function below to validate if a required field has been left empty. If the required field is blank, an alert box alerts a message and the function returns false. If a value is entered, the function returns true.  Function to validate required field in a form using javascript function validate_required(field, alerttxt) { with (field) { if (value==null||value=="") {alert(alerttxt); return false} else {return true} } } Full script, with the HTML form to validate required field  <!DOCTYPE html> <html> <head> <script> function validate_required(field, alerttxt) { with (field) { if (value==null||value=="") {alert(alerttxt);...