Aptitude Test of TCS Fresher or Campus Interview in on September 20, 2019 April 20, 2020 Share Facebook Twitter Pinterest Email 0 Welcome to Your Quiz: Aptitude Test C Programming of TCS Fresher or Campus Interview Name Email 1. What is the task of pre-processor?LinkingCompilingExpandingAll Of Above2. Which of the following does not require to include math.h header file?sinh()rand()sqrt()pow()3. Which is the character array used to accept command line arguments?char argv[]char argvchar* argv[]char* argv4. What is a dangling pointer?Point to garbage ValuePoints to addressPoints to nothingNone of Above5. The inorder and preorder traversal of a binary tree are d b e a f c g and a b d e c f g, respectively. The post-order traversal of the binary tree is:d e f g b c ae d b g f c ad e b f g c ae d b f g c a6. Which of this is used to skip one iteration:continuebreakgotoreturn7. A program reads in 500 integers in the range [0…100]representing the scores of 500 students.it then prints the frequency of each score above 50.what would be the best way for the program to store the frequencies?An array of 500 numbersAn array of 101 numbersAn array of 50 numbersA dynamically allocated array of 550 numbers8. The full set of operations allowed on a stack arePush ,popPush,pop,removePush,pop, add,removePush,pop,add,remove,substitute9. Which address does a pointer to an array store:Memory address of the fourth element of the arrayMemory address of the third element of the arrayMemory address of the first element of the arrayMemory address of the second element of the array10. Which is not a string function?strchrstrstrstrcmpstrupr11. Predict the Output : float a = 0.1;if(a==0.1)printf(“Yes”);elseprintf(“No”)YesNo12. Which of the following is true?None of aboveUnary operator works on only one operandStruct and Union works in same wayrealloc() can change the memory size of arrays13. In c language, if a function return type is not explicitly defined then it defaults to what data type?floatlong intintchar14. Comment on the below while statementwhile(0 == 0){}It has syntax error as there are no statements within braces {}It compare 0 with 0 and since they are equal it will exit the loopIt has syntax error as the same number is being compared with itselfIt will run for ever15. Which of the following is true?Elements of a linked-list can be accessed only sequentially.Array elements can be accessed and modified(elements can be added or removed) only at the ends of the array while any elements of the stack can be accessed or modified randomly through their indices.Array is a dynamic data structure whose size can be changed while stacks are static data structures whose sizes are fixed.An array can have elements of different data types.16. How many times the below loop will be executed?#include <stdio.h> int main() { int x, y; for(x=5; x>=1; x--){ for(y=1; y<=x; y++)printf("%d\n",y); } }1234512341231211234512341234512112345123451234512345111212312341234517. The difference between variable declaration and variable definition isA declaration is used for variables and definitions is used for functions.Declaration associates type to the variable whereas definition associates scope to the variable.Declaration and definition are the same. There is no difference.Declaration associates type to the variable whereas definition gives the value to the variable18. Neha is developing an IP telephony software in which the audio is encoded and transmitted by the sender as network packets through a communication channel. At the other end these packets are assembled and processed further.Neha recognizes that there maybe a very large number of packets this number is unknown and which will be processed while more packets are being received .assume that the packets arrive in right order .what data structure should Neha use?ArrayStackListQueue19. Which of the following is NOT a valid storage class in C language?AutoExternRegisterDynamic20. Which of the following statements should be used to obtain a remainder after dividing 3.14 by 2.1?rem = 3.14 % 2.1;rem = fmod(3.14, 2.1);rem = modf(3.14, 2.1);Remainder cannot be obtained in floating point division.Thank You for Submitting your response for QuizAptitude Test C Programming of TCS Fresher or Campus InterviewPlease click on View Result Button to see the Result. Time is Up!(Visited 154 times, 1 visits today) Share This Previous Post← C Programming Quiz for Beginners Level 1 C Programming Quiz for Beginners Level 1 Next PostAptitude test C Programming IBM → Aptitude test C Programming IBM