JavaScript isn't enabled in your browser, so this file can't be opened. Enable and reload.
TCS NQT Practice Test -4:Programming Logic- 22/July/2019
My Dear Students this sample test is conducted to improve the Programming skills of Engineering Students who are participating in TCS Ninja Recruitment Drive.
The organizer of this test is not going to benefit out of this test. This is completely non-profit oriented test.
Let me know for further improvements.
* Indicates required question
Email
*
Your email
7. Which type of traversal of binary search tree outputs the value in sorted order?
*
1 point
pre order
in order
post order
Level by level
2.What is the output of the following code #include<stdio.h> int main() { int a=10,b=25,i; for(int i=1;i<=0;i--) a=a+b; printf(“%d %d”,a,b); }
*
1 point
a) 35 25
b) 10 25
c) Compile time error
d) None
Roll Number
*
Your answer
Name of the Student
*
Your answer
9. Which of the following represents pointer to the file name in command line arguments
1 point
argc
argv[argc]
argc[0]
argv[1]
Clear selection
6. which of the following is the stable sorting algorithm
*
1 point
Bubble sort
Selection sort
Quick sort
Heap sort
College in abbrevation(GPREC, CRR, SACET Etc)
*
Your answer
4. Consider a hash function that distributes keys uniformly. The hash table sizeis 20. After hashing of how many keys will the probability that any new key hashedcollides with an existing one exceed 0.5.
*
1 point
a. 10
b. 7
c.6
d. 5
10. which of the following is the keyword used in a function when it returns nothing.
1 point
int
return
free
void
Clear selection
Branch
*
CSE
ECE
EEE
MEC
CIV
IT
Others
Other:
8. Which of the following is NOT a valid storage class in C language?
*
1 point
a. Extern
b. Dynamic
c. Register
d. Auto
5. When the worst case occur in linear search algorithm ?
*
1 point
.A. Item is somewhere in the middle of the array
B. Item is not in the array at all
C. Item is the last element in the array
D. Item is the last element in the array or item is not there at all
Contact Number(Optional)
Your answer
1.Which of the following is not valid datatype in c language
*
1 point
a) Long long int
b) Unsigned short int
c) Long double
d) Signed float
3. realloc () function is used to:
*
1 point
a. Get back the memory that was released earlier using free() funcion
b. Reallocate a file pointer when switching between files
Change the size of an array
d. Change the size of dynamically allocated memory
Submit
Page 1 of 1
Clear form
Never submit passwords through Google Forms.
This content is neither created nor endorsed by Google.
Report Abuse
-
Terms of Service
-
Privacy Policy
Forms