github

Made bySaurav Hathi

TCS - Company Specific Mock Test - Programming - Set 3

Q1:

Which of the following is not an in-place sorting algorithm?

Tags:
CGI1
NEW_Q
mastek
Section:
Algorithms
Options:
Q2:

In which of the following algorithms, search starts at the beginning of the list and then checks every element in the list.

Tags:
CGI1
NEW_Q
Hexaware
mastek
Section:
Algorithms
Options:
Q3:

When we pass an array name as the argument in a function, what exactly is passed to the function in C/C++?

Tags:
c++
Qualcomm_NEAT_PROG
CAT2_MC8
TCS_MC4
+ 1 more
Section:
Core Programming
Options:
Q4:

Which of the following options specifies the correct default values for array elements?

1) int -> 0

2) String -> "null"

3) Dog -> null

4) char -> '\u0000'

5) float -> 0.0f

6) boolean -> true

Tags:
java
VVDN_NEAT_PROG
InfyTQ_Java_MC1
goodhealth
Section:
Core Programming
Options:
Q5:

What will be the output of this java program?

class Alligator

{

    public static void main(String[] args)

    {

        int []x[] = {{1,2}, {3,4,5}, {6,7,8,9}};

        int [][]y = x;

        System.out.println(y[2][1]);

    }

}

Tags:
java
IN05
Section:
Core Programming
Options:
Q6:

What is the name of the method used to start a thread execution?

Tags:
java
Section:
Core Programming
Options:
Q7:

If we execute the following 2 statements in C++, then what type of variables are p and q?
typedef char* CHAR;
CHAR p,q

Tags:
c++
Section:
Core Programming
Options:
Q8:

Which of these methods is used to compare a specific region inside a string with another specific region in another string in java?

Tags:
java
Section:
Core Programming
Options: