Sie sind auf Seite 1von 5

1) What is output of the following code

Char*c = Hello
Char d[6];
While(*c++ = *d++)
2) What is pigeonhole principle?
3) solve: d2y+4dy+20y=u
4)
5)
6)
7)
8)
9)
10)
11)
12)
13)
14)
15)
16)
17)
18)
19)
20)
21)
22)
23)
24)
25)
26)
27)
28)
29)

30)

solve: 8s/3-3/(2s+2)-1/(6s+18)
What is mutex, semaphore?
What is best sorting algorithm, its time complexity?
Fibonacci which skips one digit eg: 5!=5x3x1
Exceptional handling
Function overriding
Inheritance concepts
Race condition, life stages of thread
A lot of code snippets asking to predict output
How to check if a number can be expressed in powers of 2? Using bitwise op
OO model for a college including professor students
using a jar file in a project,
construct a queue in Java.
Mother Father are two classes Child is child - how to implement this in Java?
Arraylist or Vector?
How to access the static methods of a class? - involving reflections.
Will a code written on a mac run on windows machine? Why or why not?
Thread class in Java.
Difference between document.ready() and window.onl0ad() javascript function.
Does one prefer char array or string? Why? (c++)
One instance of using Exceptions? (c++)
Why have pointers at all?
Abstract class vs Interface?
Difference between malloc and calloc, syntax of each, and how calloc is used
inline function, and use of it
difference between #define and const
some code that changes value of const, and asked what would happen
MATLAB
-2 matrices of size 3x3 and 4x3 how will you concatenate, and when the sizes are same
-whats the difference between A^2 and A.^2
-how will you plot points (2,11) (2,22),(3,33) on a plane marked with green star, ( these represent
X-y coordinates)
-whats the meaning of operator ~.
Whats a copy constructor?
- Class student {
char * name;

}
31) what happens when you initialize -student s1;?
32) what default methods compiler substitutes?
33) Whats the difference between Student s1=s2 and s1=s2? (first will invoke copy constructor and
second will invoke operator)
34) lets say class student has s1, s2 and s3 objects. is s1=s2+s3 legal in C++?

35) Whats a hash table


how will you implement an algorithm to find duplicates in an array, its time complexity, if the
array is sorted?
36) What are storage classes in C and write a basic C program for writing a string into file.
37) Number of permutations of a word - "BANANA".(math)
38) difference between path and classpath
39) what is JVM, how is java platform independent
40) what are JDK and JRE
41) what is a package
42) what are wrapper classes and what are the advantages?
43) Is java pass by value or ref? why?
44) What is polymorphism. What is the default property for a variable and a function defined in a
class (public, private or protected)?
45) What is virtual constructor?
46) What is virtual function?
47) Given a code with destructor and asked for the output?
48) Can you define a function in c++ structure?
49) Default access type of c++ structure?
50) How do you concatenate two strings?
51) Exit condition for the fibonacci series
52) OOP
53) Find the inverse of a 3x3 matrix. (math)
54) Find the orthogonal vector to A=i+2j+k; B=j+2k(math)
55) Find acceleration from velocity(math)
56) Given a differential equation and asked for degree and order.(math)
Given a matrix and asked for eigenvalue and eigenvector. (math)
57) What is overloading, overriding?
58) what is the use of destructor?
59) what is the difference between static and dynamic memory allocation?
60) What happens if a.py imports b and b.py imports a?
61) File operations in C
62) Difference between String and String Buffer
63) Null Pointer
64) can we define functions inside structures
what is critical section
65) Auto variable and register variable?
66) Invocation order of constructors and destructors in C++ inheritence.
67) Static variables.
68) Singleton concept.
69) Advantages of OOPS over procedural programming
70) Recursive function
71) Exit condition
72) How to have an instance of a class, if constructor is private
73) If class foo has private datatype and private methods only, class bar inherits from class foo. How
can you access datatypes.
74) Virtual functions and virtual destructors
75) Int arr[] = {1,2,3,4}
For (int I = 0;i<4;i++)
{
Cout<<*(arr+i)<<;

}
Definite integral and definite integral
Order of differential equation
Left inverse
Calculate the eigen values of matrix [3, -1;1, 5]
Left inverse
What is the meaning of static, extern, private constructors etc.
Typecasting
main()
{
const float pi = 3.14;
pi = 5.40;
printf(%f,&pi);
}
.
int main(void) {
int a = 5;
float b = a/2;
printf("b=%f",b);
return 0;
}
84) Object oriented design for chess game
85) How many signed integers can be represented using 32 bits
AU(B ^ C)=?
A problem on (AUBUC) formula
Some question on Finita Automata and NFA
C
What is the procedure to find an even number, other than the mod operator
What is the limitation of mod operator in C
What is a UNION datatype
76)
77)
78)
79)
80)
81)
82)
83)

C++
C++
What is an Abstract Class and its significance
Runtime polymorhism
Static keyword

86)
87)
88)
89)
90)

Java
Difference between JRE JDK and JVM
What is a hashmap
is java Call by value or call by reference( Good question, I was asked this question in multiple
interviews)
OOPs concepts
Explain how do you implement queue using stack?
Calculate a vector perpendicular to vector a and b
Given velocity find acceleration
Integral definition
Inverse or transpose of a matrix

91)
92)
93)
94)
95)
96)
97)
98)

What is a nested function?


Delete a column from matrix (matlab)
Concatenate two matrix (matlab)
What is cell array (matlab)?
What is subfunction (matlab)
Pigeon hole, graph coloring,
How do you expand (A B) U C: answer: (A U C) (B U C)
Given a vector with random numbers, how would you delete all elements which are divisible by
5?
my answer: A = A(mod(A,5)==0)=[]
99) abstruct class
100)
give an example of using pointers
101)
diff equals() and ==
102)
difference between union and structure
103)
null pointer
104)
difference i++ and ++i
105)
Harmonic series.
106)
Difference between classpath and path
107)
void pointer.
108)
Pointers
109)
how would you pass a pointer?
110)
inline function
111)
diff between #Define and constant int
112)
write a function to find whether a number is even or not.
113)
#include
114)
can structures have functions inside them. can classes have functions inside them
115)
What is a directed graph and undirected graph?
116)
Local scope and global scope
117)
Big o
118)
Hastable
119)
Time complexity of brute force
120)
Pass by value and pass by reference
121)
Rank of matrix
122)
Difference between passing a pointer and a variable to a function
123)
Difference between structure and union
124)
Difference between int and integer
125)
What makes java programs run faster?
126)
Packages in java
127)
Significance of finally keyword
128)
Invertible matrix.
129)
Velocity = (2+3*t)^2. Calculate acceleration after 3 sec and position after 4 sec
130)
F(5) = 3, f(5) =8 calculate f(3), if f=0 in all domains
131)
Mention one operator that can be used as both unary and binary operator
132)
Auto correlation, cross correlation
133)
Nyquist sampling theorm
134)
Typedef function
135)
Difference between & and && in matlab
136)
Represent a vector in matlab
137)
Left inverse and right inverse of matrix
138)
Const int a and define inta
139)
How are z transform and fourier transform related?

140)
How to concatenate 3*3 and 4*3 matrix
141)
Primitive data type in java
142)
Difference between A^2 and A.^2
143)
Whats wrong with: m = int[10]; for (i=0;i<=10;i++) m[i] = 1;
144)
a = [1 2 3; 4 5 6]; b = [1 2; 3 4]; what is a(b)?
145)
what is a connected graphand what is the minimum number of edges for a connected
graph?
146)
how do you search in a binary tree?
147)
what is the run time on balanced tree and what is a regular binary tree?
148)
difference between <stdio.h> and stdio.h
149)
40 students, all take atleast one engish or one german. 12 take both, 22 german.how many
of them took English.
150)
If two different process try to access the same memory location .how to make sure that
does not happen.
151)
L'hopital's rule
152)
What is the difference between typedef struct and struct
153)
How to read and write to a file in c

Das könnte Ihnen auch gefallen