TCS
Karthikeyan C
0 0 92
6 months ago

TCS Program - Reverse a string Solution

#include<stdio.h>
#include<stdlib.h>

int main(int argc, char* argsv[])
{
char *ptr = argsv[1];
int len=0;
while(*ptr != '\0'){
len++;
ptr++;
}

ptr--;
while(len > 0){
printf("%c",*ptr);
len--;
ptr--;
}

}

TCS
Karthikeyan C
0 0 92
6 months ago

TCS - Coding Program Decimal To Binary

#include<stdio.h>
#include<stdlib.h>

unsigned long long int decimalToBinary(int num){
unsigned long long int binary = 0, mul=1;
while(num > 0){
binary = binary + mul*(num%2);
num = num/2;
mul *= 10;
}
return binary;
}
int main(int argc, char* argsv[])
{
int num = atoi(argsv[1]);
printf("%llu", decimalToBinary(num));
}


TCS
Karthikeyan C
0 0 92
6 months ago

TCS Coding Program - Binary To Decimal Solution

#include<stdio.h>
#include<stdlib.h>

int power(int val, int pow){
while(pow > 0){
pow--;
}
}

unsigned long long int binaryToDecimal(int binary){
int num=0, pow=0;
while(binary > 0){
num = num + (binary%10)*power(2,pow);
binary /= 10;
pow++;
}
return num;
}
int main(int argc, char* argsv[])
{
long binary = atol(argsv[1]);
printf("%d", binaryToDecimal(binary));
}


TCS
A. MOHAMED RASVI
9 6 232
6 months ago

TCS Interview Experience

Hi everyone, I am Mohamed Rasvi from Kamaraj College of Engineering and Technology, Virudhunagar.I attended the TCS Code Vita competition, there were six problems. All of them were very tough. Everyone could manage to pass only 2 problems. After a week I was invited for direct technical discussion at TCS Siruseri, Chennai. The Interview was mostly based on the problems done at Code Vita to check if we have done it on our own. We were divided into groups based on the programming languages used. One thing I found very uncomfortable with was the room temperature, It was very very cold. The questions are: 1. Introduce yourself.(Basics as usual) 2. Explain the problem solved in code Vita line by line. They were very keen on it. they didn't leave any buit-in functions we used. 3. What are the libraries used to solve the problem and why? 4. Why did you choose Python to solve the problem? 5. What's the disadvantage of java over python? 6. Why and how Python allows us to write code in shorter time(continued from previous question). 7. Explain any two commonly used algorithms(area of interest). - discussed quicksort and binary search. 8.what programming languages you are comfortable with? I said Java, python ad c++. But also said language doesn't matter, Problem solving in more important. 9. Choose java or python and explain why. I said both. For AI - python and other projects Java. 10.what are the other useful packages and libraries in python. 11. Why did you choose Java for solving spiral prime problem? This is because Java's BigInteger class has many prime number related methods. 12. Is there any built-in method to find primes within a range in Java?(continued from previous question) 13. Why are you interested in machine learning and data science? 14. Do you think machine learning will be useful after 5 years? 15. What is set data structure in python?(used in codevita) Took 30 minutes for this session and four weeks for confirmation and offer letter. All the Best Guys!

TCS
Karthikeyan C
0 0 92
6 months ago

TCS Placement Drive

6-Oct-2017 00:00

6 months ago

SAIRAM GROUP OF INSTITUTIONS - CHENNAI