Skip to main content

Posts

Aptitude Questions - for Placements

1.If 2x-y=4 then 6x-3y=? (a)15 (b)12 (c)18 (d)10 Ans. (b) 2.If x=y=2z and xyz=256 then what is the value of x? (a)12 (b)8 (c)16 (d)6 Ans. (b) 3. (1/10)18 - (1/10)20 = ? (a) 99/1020 (b) 99/10 (c) 0.9 (d) none of these Ans. (a) 4.Pipe A can fill in 20 minutes and Pipe B in 30 mins and Pipe C can empty the same in 40 mins.If all of them work together, find the time taken to fill the tank (a) 17 1/7 mins (b) 20 mins (c) 8 mins (d) none of these Ans. (a) 5. Thirty men take 20 days to complete a job working 9 hours a day.How many hour a day should 40 men work to complete the job? (a) 8 hrs (b) 7 1/2 hrs (c) 7 hrs (d) 9 hrs Ans. (b) 6. Find the smallest number in a GP whose sum is 38 and product 1728 (a) 12 (b) 20 (c) 8 (d) none of these Ans. (c) 7. A boat travels 20 kms upstream in 6 hrs and 18 kms downstream in 4 hrs.Find the speed of the boat in still water and the speed of the water current? (a) 1/2 kmph (b) 7/12 kmph (c) 5 kmph (d) none of these Ans. (b) 8. A goat is tied to one cor...

What is Virtual Functions in C++

What is a virtual function? One of the most talked about feature of object oriented programming. We have two types of polymorphism in C++. One is compile-time and the other is Run-time. Virtual function is a use to achieve run-time polymorphism. Refers to performing the same operation in a hierarchy of classes. Typically used in scenarios where the base class pointer is used to hold derived class objects and perform the same operation. See the example below. When a virtual functions is called on a base class pointer the compiler decides to defer the decision on which function to call until the program is running thereby doing late binding. The actual function called at run-time depends on the contents of the pointer and not the type. Internally the compiler creates a Vtable for each class which has virtual functions or derived from base class. Addresses of virtual functions are placed in the Vtable . If a virtual function is not redefined in the derived class, t...

MCA SEM-4 Exam Time Table - Mumbai University

The written examination will be conducted in the following order : Days and Dates Time Paper ------Wednesday, May 16, 2012  03:00 p.m. to 06:00 p.m. Software Project Management. ------Friday, May 18, 2012 03:00 p.m. to 06:00 p.m. Java Programming -------Monday, May 21, 2012 03:00 p.m. to 06:00 p.m. Network Security ------Wednesday, May 23, 2012  03:00 p.m. to 06:00 p.m. Object Oriented Modeling & Design Using U M L ------Friday, May 25, 2012  03:00 p.m. to 06:00 p.m. Advance Database Techniques ------Monday, May 28, 2012  03:00 p.m. to 06:00 p.m. Elective I :Embedded Systems Elective I : Geographic Information System Elective I : Customer Relationship Management Elective I : Artificial Intelligence Elective I : E-Bussiness

Type Declaration Instruction:

This instruction is used to declare the type of variables being used in the program. A variable is a location in RAM (main memory) for temporary storage of intermediate data. Any variable used in the program must be declared before using it in any statement. The type declaration statement is written at the beginning of main() function. Ex:        int bas;             float   rs, grosssal; char   name, code; These are several subtle variations of the type declaration instruction. i) While declaring the type of variable we can also initialize it as shown below: int i=10, j=25; float a=1.5, b= 1.99+2.4 * 1.45 ; ii)   The order in which we define the variables is sometimes important sometimes not.       For exa:             int i=10,j=20; is same as    ...

The layout of C Programs

The general form of a C program is as follows: pre-processor directives global declarations main() {    local variables to function main ;    statements associated with function main ; } f1() {    local variables to function 1 ;    statements associated with function 1 ; } f2() {    local variables to function f2 ;    statements associated with function 2 ; } . . . etc Note the use of the bracket set () and {}. () are used in conjunction with function names whereas {} are used as to delimit the C statements that are associated with that function. Also note the semicolon - yes it is there, but you might have missed it! a semicolon (;) is used to terminate C statements. C is a free format language and long statements can be continued, without truncation, onto the next line. The semicolon informs the C compiler that the end of the statement has been reached. Free format also means that you can a...