HCL Technical Questions and Answers
HCL Technical Questions and Answers
1. In C, if you pass an array as an argument to a function, what actually gets passed?
2. What will happen if in a C program you assign a value to an array element whose
subscript exceeds the size of an array?
Answer - C. The program may crash if some important data gets overwritten
Explanation:
If the index of the array size is exceeded, the program will crash. But modern compilers will
take care of this kind of errors.
A. C
B. C++
C. Java
https://www.freshersnow.com/placement-papers-download/
HCL Technical Questions and Answers with Explanation
D. Python
Answer - Option A.
Explanation: C is not an object-oriented language
A. PHP
B. Ruby
C. Perl
D. JavaScript
E. None of the Above
6. Which of the following statements should be used to obtain a remainder after dividing 3.14
by 2.1?
A. Type
B. Number of arguments
C. Both (A) and (B)
D. None of these
8. In C, if you pass an array as an argument to a function, what actually gets passed?
https://www.freshersnow.com/placement-papers-download/
HCL Technical Questions and Answers with Explanation
9. Which of the following real-world scenarios would you associate with a stack data
structure?
11. What is the time complexity of pop() operation when the stack is implemented using an
array?
A. O(1)
B. O(n)
C. O(log n)
D. O(n log n)
https://www.freshersnow.com/placement-papers-download/
HCL Technical Questions and Answers with Explanation
Answer - A. O(1)
Explanation: pop() accesses only one end of the structure, and hence constant time.
A. System-centered
B. User-centered
C. Company-centered
D. Data-centered
Answer - B. User-centered
Explanation: Database is user-centered. The perspective is that the user is always right. If
there is a problem with the use of the system, the system is the problem, not the user.
A. Relation
B. Attribute
C. Parameter
D. Constraint
Answer - B. Attribute
Explanation: An attribute is a characteristic of an entity. The association among the entities
is described by the relationship.
https://www.freshersnow.com/placement-papers-download/
HCL Technical Questions and Answers with Explanation
C. Parameter
D. Constraint
Answer - D. Constraint
Explanation: Constraint is a restriction that is placed on the data. The attribute is the
characteristic and the relation describes the association.
https://www.freshersnow.com/placement-papers-download/