Are you preparing for the TCS Campus Placement Exam? Understanding the exam pattern, important topics, and coding challenges will help you ace the test.
This guide provides an updated overview of the TCS written test format, along with sample questions for C programming concepts and coding tests.
The TCS recruitment test consists of four sections:
Section | Description |
---|---|
1. Quantitative Aptitude | Mathematical reasoning and problem-solving |
2. Verbal Ability | English proficiency, grammar, and written communication |
3. Programming Language Proficiency | Conceptual questions on C programming |
4. Coding Test | Hands-on coding challenges in C language |
#include <stdio.h>
void main() {
int k = 5;
int *p = &k;
int **m = &p;
printf("%d%d%d\n", k, *p, **m);
}
Options:
a) 5 5 5
b) 5 5 junk
c) 5 junk junk
d) Compile-time error
a) They both are the same
b) Runtime errors are automatically displayed in stderr
c) Both are connected to the screen by default
d) stdout is line buffered, but stderr is unbuffered
main()
function should always be the first function in a C programOptions:
a) 2, 3
b) 1, 2
c) 1, 2, 3
d) 1, 2, 3, 4
a) The return value remains unchanged
b) All local variables inside the function are initialized to zero
c) The function can only be accessed within the same source file
d) Static prefix cannot be used with functions
while (0 == 0) { }
Options:
a) Syntax error (empty braces {}
)
b) Infinite loop
c) Exits immediately since 0 == 0
d) Syntax error (same number being compared)
Problem:
Write a C program to calculate the factorial of a non-negative integer (N).
Input:
Output:
Example:
Input: 5
Output: 120
Problem:
Write a C program to find the area of a triangle given the base and height as input parameters.
Input:
Output:
Example:
Input: 10 5
Output: 25.00
Note: Ensure the output is not printed in scientific notation (e.g., 1.00E+5 is incorrect).
The TCS Campus Placement Test is a crucial step for aspiring candidates looking to secure a job in one of the top IT companies. With a structured approach and focused preparation, you can excel in all four sections: Quantitative Aptitude, Verbal Ability, C Programming Concepts, and Coding Tests.