TCS Placement Questions & Answers :: TCS
541 / 652
If a function is defined as static, it means
AThe value returned by the function does not change
Ball the variable declared inside the function automatically will be assigned
Cinitial value of zero
DIt should be called only within the same source code / program file.
Answer: Option D
Explanation:Here is no explanation for this answer
Submit Your Solution
542 / 652
void main()
{
int k = 5;
int *p = &k;
int **m = &p;
printf("%d%d%d\n", k, *p, **m);
}
A5 5 5
B5 5 junk
C5 junk junk
DCompile time error
Answer: Option A
Explanation:Here is no explanation for this answer
Submit Your Solution
543 / 652
void myfunc(char** param){
++param;
}
int main(){
char* string = (char*)malloc(64);
strcpy(string, "hello_World");
myfunc(&string);
myfunc(&string);
printf("%s\n", string);
return 0;
}
Ahello_World
Bello_World
Clo_World
Dllo_World
Answer: Option A
Explanation:Here is no explanation for this answer
Submit Your Solution
544 / 652
All keywords in C are in
AUppercase letters
BCamel Case letters
CLowercase letters
DNone of these
Answer: Option C
Explanation:Here is no explanation for this answer
Submit Your Solution
545 / 652
int **ptr; is?
APointer to integer
BInvalid declaration
CPointer to pointer
Answer: Option C
Explanation:Here is no explanation for this answer
Submit Your Solution
546 / 652
Which of the following is a collection of different data types?
AString
BStructure
CArray
DFiles
Answer: Option B
Explanation:Here is no explanation for this answer
Submit Your Solution
547 / 652
Which of the following uses structure?
ALinked Lists
BArray of structures
CBinary Tree
DAll of these
Answer: Option D
Explanation:Here is no explanation for this answer
Submit Your Solution
548 / 652
In Madras, temperature at noon varies according to -t^2/2 + 8t + 3, where t is elapsed time. Find how much temperature more or less in 4pm to 9pm.
A7
B7.8
C7.5
D8
Answer: Option C
Explanation:By putting t=4,
temp = -16/2+32+3 = 27
By putting t=9,
temp = -81/2+72+3 = 34.5
Change = 34.5-27) = 7.5
Submit Your Solution
549 / 652
There are 20 persons sitting in a circle. In that there are 18 men and 2 sisters. How many arrangements are possible in which the two sisters are always separated by a man?
A18! * 2
B17!
C17! * 2
D12!
Answer: Option A
Explanation:Here 2 sisters can be assumed 1 sister,
In this way there are total of 19 member,
Formula for circular seating arrangement: (n-1)!
So, (19-1)! = 18!
2 sisters can sit in 2 ways.
Hence answer is 18! *2
Submit Your Solution
550 / 652
What is the remainder when 617+1176617+1176 is divided by 7?
A2
B1.999
C3
DNone of these
Answer: Option B
Explanation:617+1176617+1176=1178410
1178410/7=168344.28571428
subtract 168344 = 0.28571428
Now multiply denominator = 0.28571428*7 =1.99999
Submit Your Solution
Here is the list of questions asked in TCS Aptitude Test Question with Answers page 55. Practice TCS Written Test Papers with Solutions and take Q4Interview TCS Online Test Questions to crack TCS written round test. Overall the level of the TCS Online Assessment Test is moderate. Only those candidates who clear the written exam will qualify for the next round, so practic all the questions here and take all the free tests before going for final selection process of TCS