Home »» Placement Papers »» All Papers »» Huawei »» Placement Paper

Huawei Campus Placement - Technical questions from previous years


Some of the questions observed in the technical section of the written exam at Huawei are:

• In operating System, what do you mean by a process?

• What is the importance of file management in C?

• What is the size of int*ptr and char*ptr?

• Define function.

• In a linked list find a solution of loop and explain the solution in a mathematical expression to prove the correctness.

• After giving an integer, find the least palindrome.

• How will you write your own linked list and Hash map in Java?

• How will you reverse a linked list?

• Explain, how you will find if a loop exists in a linked list.

• How will you write the output for the below given program
Switch (1)
{
Case 1: printf (“1”)
Case 2: printf (“2”)
Default: printf (“default”)
}

• From the below mentioned options choose which statement is true

a. Compilation fails
b. “even” will always be output
c. “odd” will be output for odd values of x, and “even” for even values
d. “odd” will always be output

• From the below mentioned options choose the size of generic pointer in C

a. 0
b. 2
c. 1
d. Null
e. Undefined

 Explain the similarity between a structure, union and enumeration.
a. All of them let you define new data types
b. All of them let you define new structures
c. All of them let you define new values
d. All of them let you define new pointers

 What actually passes In C, if you pass an array as an argument to a function?

a. Base address of the array
b. First element of the array
c. Address of the last element of array
d. Value of elements in array

 In which header file is the NULL macro defined

a. Stdio.h and stddef.h
b. Stdlib.h
c. Stdio.h
d. Stddef.h

 From the below given options which will you execute first?

i. &&
ii. ||
iii. !

a. iii
b. i
c. ii
d. all are equal

 Storage class defines:

a. Scope and Permeance
b. Permeance
c. Scope

• Choose the correct option, how many additions would you do in the below mentioned program

For (i=0; i<31; i++)
For (j=0; j<31; j++)
For (k=0; k<31; k++)
d=d+1;

How many times will you execute the for loop?
for (i=0; i<10; i++)

a. Compiler error
b. 10
c. 1
d. Not executed

• How will you find the size of file in UNIX if the dynamic memory is it allocated from a heap/ stack?

• What will be the proto type of printf?

From the below mentioned option, which is a type of linkages?

a. External, internal, None
b. Internal and external
c. External and none
d. Internal

Which of the following are unary operators in C?

i. !
ii. sizeof
iii. ~
iv. &&

a. 2, 4
b. 1, 2, 3
c. 1, 2
d. 1, 3

What will be your course of action to treat the constant 3.14 as a float?

a. use 3.14f
b. use float (3.14f)
c. use f(3.14)
d. use (f)(3.14)

Which is the keyword used to transfer control from a function back to the calling function is?

a. Return
b. Goto
c. Switch
d. Go back

Comment

0 Answers