Associate Technology Trainee
Associate Technology Trainee Interview Questions and Answers

Asked in Publicis Sapient

Q. What is the difference between a function definition and a function declaration?
Function definition specifies the implementation of a function, while declaration provides the function signature.
Function definition includes the function body, while declaration only includes the function signature.
Function definition is used to define the behavior of a function, while declaration is used to announce the existence of a function.
Function definition can only appear once in a program, while declaration can appear multiple times.
Example of function definition: ...read more

Asked in Publicis Sapient

Q. How do you swap numbers without using a temporary variable?
Swapping numbers without using a temporary variable
Use addition and subtraction to swap the numbers
Example: a = 5, b = 10. a = a + b (15), b = a - b (5), a = a - b (10)
Alternatively, use bitwise XOR operation to swap the numbers
Example: a = 5, b = 10. a = a ^ b (15), b = a ^ b (5), a = a ^ b (10)

Asked in Publicis Sapient

Q. Write a programme for Fibonacci series, length of string
This program generates a Fibonacci series up to a given length.
Use an array to store the Fibonacci series
Initialize the first two elements of the array as 0 and 1
Use a loop to generate the subsequent elements of the series
Stop the loop when the desired length is reached

Asked in Publicis Sapient

Q. What are data types and pointers
Data types are classifications of data that determine the type of values that can be stored and manipulated. Pointers are variables that store memory addresses.
Data types include integers, floating-point numbers, characters, and booleans.
Pointers are used to store memory addresses of variables or objects.
Example: int num = 10; int *ptr = # // ptr stores the memory address of num

Asked in TCS

Q. What is an array?
An array is a data structure that stores a collection of elements of the same type in a contiguous block of memory.
Arrays can be of any data type, including strings.
Elements in an array are accessed using an index starting from 0.
Arrays have a fixed size, which is determined at the time of declaration.
Arrays can be multidimensional, allowing for the storage of data in multiple dimensions.
Example: ['apple', 'banana', 'orange']
Associate Technology Trainee Jobs



Interview Experiences of Popular Companies







Reviews
Interviews
Salaries
Users

