Add office photos
Engaged Employer

TCS

3.7
based on 88.6k Reviews
Video summary
Filter interviews by

200+ Marks & Spencer Interview Questions and Answers

Updated 17 Jan 2025
Popular Designations

Q1. #include int main() { int any = ' ' * 10; printf("%d", any); return 0; } What is the output?

Ans.

The program outputs 320, which is the ASCII value of space multiplied by 10.

  • The variable 'any' is assigned the value of ' ' (space) multiplied by 10, which is 320 in ASCII.

  • The printf statement outputs the value of 'any', which is 320.

  • The #include statement is not relevant to the output of the program.

View 1 answer

Q2. Compute the nearest larger number by interchanging its digits updated.Given 2 numbers a and b find the smallest number greater than b by interchanging the digits of a and if not possible print -1.

Ans.

Compute the nearest larger number by interchanging its digits.

  • Given two numbers a and b

  • Find the smallest number greater than b by interchanging the digits of a

  • If not possible, print -1

View 1 answer

Q3. Difference between Structure and Union in C programming language, What is OOPs and it’s features ?

Ans.

Structure and Union are data structures in C. OOPs is Object Oriented Programming paradigm with features like inheritance, polymorphism, encapsulation, and abstraction.

  • Structure is a collection of variables of different data types under a single name. Union is similar but all variables share the same memory location.

  • OOPs is a programming paradigm that focuses on objects and their interactions. It features inheritance, where a class can inherit properties and methods from anot...read more

Add your answer

Q4. Write a program to find a number that is palindrome or not ?

Ans.

Program to check if a number is palindrome or not.

  • Convert the number to a string

  • Reverse the string

  • Compare the reversed string with the original string

  • If they are equal, the number is a palindrome

View 2 more answers
Discover Marks & Spencer interview dos and don'ts from real experiences

Q5. Basic print function of python and OOPS concept explanation

Ans.

Python's print function and OOPS concept explanation

  • The print() function is used to display output on the console

  • It can take multiple arguments separated by commas

  • OOPS stands for Object-Oriented Programming System

  • It is a programming paradigm based on the concept of objects

  • Objects have properties (attributes) and methods (functions)

  • Encapsulation, inheritance, and polymorphism are key OOPS concepts

Add your answer

Q6. Write a program to print addition of two numbers such that if no number is input by the user then the program should use the "break" syntax of python and end.

Ans.

Program to print addition of two numbers with break syntax if no input.

  • Use input() function to take user input

  • Use try-except block to handle errors

  • Use while loop to keep taking input until break is entered

View 1 answer
Are these interview questions helpful?

Q7. Write a sql query to find all records whose base branch city is kolkata and haven't been allocated to projects

Ans.

SQL query to find records with base branch city Kolkata and not allocated to projects

  • Use SELECT statement to retrieve data from table

  • Use WHERE clause to filter records with base branch city Kolkata

  • Use LEFT JOIN to join table with project allocation table

  • Use IS NULL condition to filter records not allocated to projects

Add your answer

Q8. Principles of oops and explain agile methodologies and explain uses of stack and basic web development questions

Ans.

Answering questions on OOPs principles, agile methodologies, stack uses, and basic web development.

  • OOPs principles include encapsulation, inheritance, and polymorphism

  • Agile methodologies involve iterative and incremental development

  • Stack is a data structure that follows LIFO principle

  • Basic web development questions may include HTML, CSS, and JavaScript

  • HTML is used for creating the structure of a web page

  • CSS is used for styling the web page

  • JavaScript is used for adding interac...read more

Add your answer
Share interview questions and help millions of jobseekers 🌟

Q9. What is the logic for sorting the numbers in C programming?

Ans.

Sorting numbers in C programming involves using various algorithms to arrange them in ascending or descending order.

  • Common sorting algorithms include bubble sort, insertion sort, selection sort, merge sort, and quicksort.

  • The choice of algorithm depends on the size of the data set and the efficiency required.

  • Sorting can be done using loops and conditional statements in C programming.

  • The sorted array can be printed using a for loop.

  • Sorting can also be done using library functio...read more

Add your answer

Q10. Can you work in any location? What if we assign you in the Sahara desert with 55 degree Celsius temperature?

Ans.

Yes, I am willing to work in any location including the Sahara desert with 55 degree Celsius temperature.

  • I am adaptable and can work in any environment.

  • I am willing to face challenges and overcome them.

  • I will take necessary precautions to ensure my safety and health.

  • I will follow company guidelines and procedures.

  • Examples: I have worked in remote locations with extreme weather conditions before and have experience in handling such situations.

Add your answer

Q11. Is Java a method based programming language or a function based programming language?

Ans.

Java is a method based programming language.

  • Java is a method based programming language because it relies on methods (functions) to perform actions.

  • In Java, functions are defined within classes and are called using objects or class names.

  • Example: public void printMessage() { System.out.println("Hello, World!"); }

View 1 answer

Q12. Which programming language are you most comfortable in?

Ans.

I am most comfortable in Java.

  • I have experience in developing Java applications for both desktop and web environments.

  • I am familiar with Java frameworks such as Spring and Hibernate.

  • I have also worked with Java-based tools like Maven and Jenkins.

  • I am comfortable with object-oriented programming concepts and design patterns in Java.

  • For example, I have developed a web application using Spring MVC and Hibernate for database connectivity.

Add your answer

Q13. What is polymorphism in java and its types?

Ans.

Polymorphism is the ability of an object to take on many forms. In Java, it is achieved through method overloading and overriding.

  • Polymorphism allows objects to be treated as if they are of multiple types.

  • Method overloading is a type of polymorphism where multiple methods have the same name but different parameters.

  • Method overriding is a type of polymorphism where a subclass provides its own implementation of a method that is already defined in its superclass.

  • Polymorphism is ...read more

Add your answer

Q14. Lists are mutable objects whereas as Tuples are immutable. --Mutable objects - Allow you to change the value/data in place without affecting the objects identity. --Immutable objects - In contrast to the Mutabl...

read more
Ans.

Lists can be modified after creation, while tuples cannot be changed once created.

  • Lists use square brackets [] while tuples use parentheses ()

  • Example: list_example = [1, 2, 3], tuple_example = (4, 5, 6)

  • Lists are more flexible but tuples are faster and consume less memory

Add your answer

Q15. Write a program to check whether the given number is palindrom.

Ans.

Program to check if a number is a palindrome

  • Convert the number to a string

  • Reverse the string

  • Compare the original string with the reversed string

  • If they are the same, the number is a palindrome

Add your answer

Q16. What are the difference between Local variable and Global Variable?

Ans.

Local variables are declared inside a function and have a limited scope, while global variables are declared outside a function and can be accessed from anywhere in the program.

  • Local variables are only accessible within the function they are declared in.

  • Global variables can be accessed from any part of the program.

  • Local variables are created when a function is called and destroyed when the function returns.

  • Global variables are created when the program starts and destroyed whe...read more

Add your answer

Q17. What is the difference between list and tuples

Ans.

Lists are mutable while tuples are immutable in Python.

  • Lists use square brackets [] while tuples use parentheses ().

  • Elements in a list can be added, removed, or modified while tuples cannot be modified.

  • Lists are used for collections of homogeneous items while tuples are used for heterogeneous items.

  • Lists are slower than tuples in terms of performance.

  • Example of a list: [1, 2, 3] and example of a tuple: (1, 'apple', True).

Add your answer

Q18. What is the difference between method overloading and method overriding?

Ans.

Method overloading is having multiple methods with the same name but different parameters. Method overriding is having a method in a subclass with the same name and parameters as a method in its superclass.

  • Method overloading is a compile-time polymorphism while method overriding is a runtime polymorphism.

  • Method overloading is used to provide different ways of calling the same method with different parameters.

  • Method overriding is used to provide a specific implementation of a ...read more

Add your answer

Q19. what is thread and its lifecycle?

Ans.

A thread is a lightweight process that can run concurrently with other threads in a program.

  • Threads share the same memory space as the parent process.

  • Threads can communicate with each other through shared memory.

  • Thread lifecycle includes creation, running, waiting, and termination.

  • Threads can be created using the Thread class in Java or pthread_create() function in C.

  • Examples of multithreaded programs include web servers and video games.

Add your answer

Q20. Why you choose python to learn instead of other languages?

Ans.

Python is easy to learn, versatile, and has a large community support.

  • Python has a simple syntax and is easy to read and write.

  • It has a wide range of applications, from web development to data analysis and machine learning.

  • Python has a large community of developers who contribute to its libraries and frameworks.

  • Python is versatile and can be used for both small and large projects.

  • Python is an interpreted language, which means it can be run on any platform without the need for...read more

Add your answer

Q21. Given two linked list of numbers. Add them to form a new linked list example 1->2->3+4->5->6=5->7->9

Ans.

Add two linked lists of numbers to form a new linked list.

  • Traverse both linked lists simultaneously and add the corresponding nodes.

  • If one list is shorter than the other, pad it with zeros.

  • If the sum of two nodes is greater than 9, carry over the 1 to the next node.

  • Create a new linked list with the sum of nodes.

  • Return the head of the new linked list.

Add your answer

Q22. What are four pillars of OOP? Explain with examples

Ans.

The four pillars of OOP are Abstraction, Encapsulation, Inheritance, and Polymorphism.

  • Abstraction: Hiding implementation details and showing only necessary information. Example: A car dashboard shows only necessary information like speed, fuel level, etc.

  • Encapsulation: Binding data and functions that manipulate the data together. Example: A class in OOP encapsulates data and functions that operate on that data.

  • Inheritance: Creating new classes from existing ones, inheriting t...read more

Add your answer

Q23. What is the difference is between procedural and object oriented programming

Ans.

Procedural programming focuses on procedures or functions while object oriented programming focuses on objects and their interactions.

  • Procedural programming is based on the concept of procedures or functions that perform specific tasks.

  • Object oriented programming is based on the concept of objects that have properties and methods.

  • Procedural programming is more suited for small programs while object oriented programming is better for larger programs.

  • In procedural programming, ...read more

Add your answer

Q24. What is the python code to shutdown a laptop?

Ans.

The python code to shutdown a laptop is 'os.system('shutdown /s /t 1')'

  • Import the os module

  • Use the os.system() function

  • Pass the command 'shutdown /s /t 1' as an argument

  • The '/s' flag is used to shutdown the computer

  • The '/t 1' flag is used to set a timer of 1 second before shutdown

Add your answer

Q25. Print the adress of a pointer, adress of a variable and value in variable?

Ans.

Printing the address of a pointer, address of a variable and value in variable.

  • To print the address of a pointer, use the '&' operator before the pointer variable name.

  • To print the address of a variable, use the '&' operator before the variable name.

  • To print the value in a variable, simply use the variable name.

Add your answer

Q26. (1) Write a code to print if number is prime or not prime (2) Explain logic behind code (3) What are joins

Ans.

Code to check if a number is prime or not and explanation of logic behind it.

  • A prime number is only divisible by 1 and itself.

  • Loop through all numbers from 2 to n-1 and check if n is divisible by any of them.

  • If n is divisible by any number, it is not prime.

  • If n is not divisible by any number, it is prime.

Add your answer

Q27. What are the 4 pillars of C++ ?

Ans.

The 4 pillars of C++ are encapsulation, inheritance, polymorphism, and abstraction.

  • Encapsulation: Bundling data and methods that operate on the data into a single unit (class).

  • Inheritance: Creating new classes from existing classes, inheriting their attributes and methods.

  • Polymorphism: Ability to present the same interface for different data types.

  • Abstraction: Hiding complex implementation details and showing only the necessary features.

Add your answer

Q28. Tell me about yourself,dbms,sql,python oops

Ans.

I am a tech enthusiast with knowledge in DBMS, SQL, Python and OOPs concepts.

  • Proficient in DBMS concepts and SQL queries

  • Skilled in Python programming and OOPs concepts

  • Experience in designing and implementing databases

  • Familiarity with data structures and algorithms

  • Ability to work in a team and adapt to new technologies

View 1 answer

Q29. What is sdlc? What is white box testing how it usefull

Ans.

SDLC stands for Software Development Life Cycle. White box testing is a testing technique that involves testing the internal structure of the software.

  • SDLC is a process followed by software development teams to design, develop, test, and deploy software.

  • It consists of several phases such as planning, analysis, design, implementation, testing, and maintenance.

  • White box testing is a testing technique that involves testing the internal structure of the software, including code, ...read more

Add your answer

Q30. What is the use of Having and Where in SQL query?

Ans.

HAVING and WHERE are used in SQL queries to filter data based on certain conditions.

  • WHERE is used to filter data based on a specific condition in the WHERE clause.

  • HAVING is used to filter data based on a specific condition in the GROUP BY clause.

  • WHERE is used before GROUP BY, while HAVING is used after GROUP BY.

  • WHERE is used with single-row functions, while HAVING is used with group functions.

  • Example: SELECT name, SUM(sales) FROM sales_table WHERE sales > 1000 GROUP BY name H...read more

Add your answer

Q31. Which one of them is immutable (list or tuple)?

Ans.

Tuple is immutable.

  • Tuple cannot be modified once created.

  • List can be modified by adding, removing or changing elements.

Add your answer

Q32. What is break, continue and pass in Python?

Ans.

break, continue and pass are control statements in Python used to alter the flow of loops and conditional statements.

  • break is used to terminate a loop prematurely

  • continue is used to skip the current iteration and move to the next one

  • pass is used as a placeholder when a statement is required syntactically but no action is needed

Add your answer

Q33. How can you delete nth element from a linked list?

Ans.

To delete nth element from a linked list, we need to traverse to the (n-1)th node and change its next pointer to (n+1)th node.

  • Traverse to (n-1)th node

  • Change its next pointer to (n+1)th node

  • Free the memory of nth node

Add your answer

Q34. Which is better Hard Work or Smart Work

Ans.

Both hard work and smart work are important, but a combination of both is the key to success.

  • Hard work is necessary to achieve goals and develop skills.

  • Smart work helps in optimizing time and resources.

  • A combination of both can lead to efficient and effective results.

  • For example, a student who studies hard but also uses effective study techniques like summarizing and practicing questions is likely to perform better than a student who only studies hard without any strategy.

  • Sim...read more

View 1 answer

Q35. What is loops, explain the types of loops?

Ans.

Loops are used to execute a set of statements repeatedly. There are three types of loops: for, while, and do-while.

  • For loop is used when the number of iterations is known beforehand.

  • While loop is used when the number of iterations is not known beforehand.

  • Do-while loop is similar to while loop, but it executes the statements at least once before checking the condition.

  • Example: for(int i=0; i<10; i++) { //statements }

  • Example: int i=0; while(i<10) { //statements i++; }

  • Example: i...read more

Add your answer

Q36. What is an exception in java?

Ans.

An exception is an event that occurs during the execution of a program that disrupts the normal flow of instructions.

  • Exceptions are objects that are thrown when an error occurs in a program.

  • They can be caught and handled using try-catch blocks.

  • Common exceptions include NullPointerException, ArrayIndexOutOfBoundsException, and IOException.

  • Exceptions can be caused by a variety of factors, such as invalid input, network errors, or programming errors.

Add your answer

Q37. What is throw keyword in java?

Ans.

throw keyword is used to explicitly throw an exception in Java.

  • It is followed by an instance of the Exception class or one of its subclasses.

  • It is used to handle exceptional situations in a program.

  • It is used in combination with try-catch block to handle exceptions.

  • Example: throw new NullPointerException();

Add your answer

Q38. What is Inheritance? What is a parent class ?

Ans.

Inheritance is a concept in object-oriented programming where a class can inherit attributes and methods from another class, known as the parent class.

  • Inheritance allows for code reusability and promotes the concept of hierarchical classification.

  • A parent class is also known as a base class or superclass.

  • Child classes can inherit attributes and methods from the parent class.

  • Example: If we have a parent class 'Animal' with attributes like 'name' and methods like 'eat()', a chi...read more

Add your answer

Q39. Tell me the differences between a list and a tuple

Ans.

A list is mutable and ordered while a tuple is immutable and ordered.

  • Lists can be modified while tuples cannot

  • Lists are defined using square brackets while tuples use parentheses

  • Lists are used for collections of data that may change while tuples are used for fixed collections of data

  • Example of a list: [1, 2, 3] and example of a tuple: (1, 2, 3)

Add your answer

Q40. array in Python? Slicing in Py? Scope in py? list

Ans.

Python arrays, slicing, scope, and lists.

  • Arrays in Python are homogeneous collections of data that are stored in contiguous memory locations.

  • Slicing in Python is a way to extract a portion of a sequence, such as a string, list, or tuple.

  • Scope in Python refers to the region of a program where a variable is defined and can be accessed.

  • Lists in Python are ordered collections of items that can be of different data types.

Add your answer

Q41. How do you look up on solution when you are stuck?

Ans.

I first try to analyze the problem, research online resources, consult with colleagues, and experiment with different solutions.

  • Analyze the problem to understand the root cause

  • Research online resources such as forums, documentation, and tutorials

  • Consult with colleagues or mentors for their insights

  • Experiment with different solutions to see what works best

Add your answer

Q42. Do you know what are AI and ML ?

Ans.

AI stands for Artificial Intelligence and ML stands for Machine Learning.

  • AI is the simulation of human intelligence in machines that are programmed to think and learn like humans.

  • ML is a subset of AI that involves training algorithms to make predictions or decisions based on data.

  • AI and ML are used in various industries such as healthcare, finance, and transportation.

  • Examples of AI and ML include virtual assistants like Siri and Alexa, self-driving cars, and fraud detection s...read more

Add your answer

Q43. What is the difference between primary and unique key

Ans.

Primary key uniquely identifies a record in a table, while a unique key ensures that all values in a column are distinct.

  • Primary key can't have null values, while unique key can have one null value.

  • A table can have only one primary key, but multiple unique keys.

  • Primary key is automatically indexed, while unique key may or may not be indexed.

Add your answer

Q44. How many data types are there in python?

Ans.

Python has 6 standard data types - Numbers, Strings, Lists, Tuples, Sets, and Dictionaries.

  • Python has 3 numeric data types - int, float, and complex

  • Strings are immutable sequences of Unicode characters

  • Lists are mutable sequences of objects

  • Tuples are immutable sequences of objects

  • Sets are unordered collections of unique elements

  • Dictionaries are unordered key-value pairs

Add your answer

Q45. About inheritance and explain it with real life examples?

Ans.

Inheritance is a concept in object-oriented programming where a class can inherit properties and methods from another class.

  • Inheritance allows for code reuse and promotes a hierarchical structure.

  • A child class can inherit properties and methods from a parent class.

  • For example, a Car class can inherit properties and methods from a Vehicle class.

  • Another example is a Dog class inheriting properties and methods from an Animal class.

  • Inheritance can also involve multiple levels, wi...read more

Add your answer

Q46. Working of constructors in inheritance with real life examples?

Ans.

Constructors in inheritance allow child classes to inherit properties and methods from parent classes.

  • Constructors in child classes can call the constructor of the parent class using the 'super' keyword.

  • If a child class does not have a constructor, it will automatically inherit the constructor of the parent class.

  • Constructors can be used to initialize properties of the child class as well as the parent class.

  • Real life example: A car is a child class of a vehicle. The construc...read more

Add your answer

Q47. What are the features of OOPS ?

Ans.

OOPS (Object-Oriented Programming System) features include encapsulation, inheritance, polymorphism, and abstraction.

  • Encapsulation: Bundling data and methods that operate on the data into a single unit (class).

  • Inheritance: Ability to create a new class by inheriting attributes and methods from an existing class.

  • Polymorphism: Ability to use a single interface to represent different data types or objects.

  • Abstraction: Hiding the complex implementation details and showing only th...read more

View 1 answer

Q48. Paper presentation experience outside your college campus.

Ans.

I have presented a paper on Artificial Intelligence at a national conference.

  • Presented a paper on AI at a national conference organized by IEEE.

  • Discussed the impact of AI on the future of work and society.

  • Received positive feedback from the audience and panelists.

  • Networked with professionals in the field and gained insights into current research.

  • Published the paper in the conference proceedings.

Add your answer

Q49. What is thePrototype of C language?

Ans.

The prototype of C language is int main()

  • The prototype specifies the return type and parameters of a function

  • int main() is the prototype for the main function in C

  • The parentheses are required even if there are no parameters

  • Other functions can have different prototypes depending on their return type and parameters

Add your answer

Q50. What is object oriented programming language? What are constructors?

Ans.

Object oriented programming is a paradigm that uses objects to represent real-world entities. Constructors are special methods used to initialize objects.

  • Object oriented programming focuses on objects and their interactions

  • Objects have properties and methods that define their behavior

  • Constructors are used to create and initialize objects

  • In Java, constructors have the same name as the class and are called when an object is created

  • Constructors can take parameters to set initial...read more

Add your answer

Q51. What are the programming language you know?

Ans.

I am proficient in Java, Python, and C++.

  • Proficient in Java, Python, and C++

  • Experience with object-oriented programming

  • Familiarity with data structures and algorithms

  • Knowledge of web development frameworks such as Django and Spring

Add your answer

Q52. What is java? What are the features of java

Ans.

Java is a high-level, object-oriented programming language used for developing applications and software.

  • Java is platform-independent, meaning it can run on any platform with a Java Virtual Machine (JVM)

  • It is statically-typed, which means that variables must be declared before they can be used

  • Java is object-oriented, which means that everything in Java is an object

  • It has automatic memory management, meaning that the programmer does not need to manually allocate and deallocate...read more

Add your answer

Q53. what are collections in java?

Ans.

Collections in Java are classes and interfaces that group multiple objects into a single unit.

  • Collections provide a way to manage and manipulate groups of objects.

  • They are used to store, retrieve, and manipulate data in a structured way.

  • Examples of collections include ArrayList, LinkedList, HashSet, and TreeMap.

  • Collections can be used to sort, search, filter, and modify data.

  • They are an important part of Java programming and are used extensively in real-world applications.

Add your answer

Q54. Differentiate between call by reference and call by value

Ans.

Call by reference passes the address of the variable as an argument, while call by value passes the value of the variable.

  • Call by reference allows the function to modify the actual value of the variable passed as an argument.

  • Call by value only allows the function to work with a copy of the variable's value.

  • Example: In call by reference, changes made to the parameter inside the function will reflect outside the function. In call by value, changes made to the parameter inside t...read more

Add your answer

Q55. Define oops and explain the types of it.

Ans.

OOPs stands for Object-Oriented Programming. It is a programming paradigm based on the concept of objects.

  • There are four main types of OOPs: Abstraction, Encapsulation, Inheritance, and Polymorphism.

  • Abstraction is the process of hiding complex implementation details and showing only the necessary information to the user.

  • Encapsulation is the process of binding data and functions that manipulate that data together in a single unit.

  • Inheritance is the process of creating new clas...read more

Add your answer

Q56. what are pointers?

Ans.

Pointers are variables that store memory addresses of other variables in a program.

  • Pointers allow for dynamic memory allocation and manipulation.

  • They are used to pass data between functions efficiently.

  • Pointers can be used to create complex data structures like linked lists and trees.

  • Example: int *ptr; // declares a pointer to an integer variable

  • Example: ptr = # // assigns the address of num to ptr

  • Example: *ptr = 10; // assigns the value 10 to the variable pointed to by ptr

View 2 more answers

Q57. Types of data types with few examples.

Ans.

Data types are classifications of data items that indicate the kind of values they contain.

  • Primitive data types: int, float, double, char, boolean

  • Non-primitive data types: arrays, strings, classes, interfaces

  • Examples: int age = 25, float price = 10.5, char grade = 'A', boolean isTrue = true, String name = 'John', int[] numbers = {1, 2, 3}

Add your answer

Q58. Write a program to find the greatest number among three numbers

Ans.

Program to find the greatest number among three numbers

  • Declare three variables to store the three numbers

  • Compare the first two numbers and store the greater one in a temporary variable

  • Compare the temporary variable with the third number and store the greatest one in another variable

  • Print the greatest number

Add your answer

Q59. IS PYTHON A CASE SENSITIVE LANGUAGE

Ans.

Yes, Python is a case sensitive language.

  • Variable names 'myVar' and 'myvar' are different in Python.

  • Keywords like 'if', 'else', 'while' are case sensitive.

  • Function names and module names are also case sensitive.

Add your answer

Q60. Pseudocode for switching the values of two variables without using a third variable

Ans.

Switch values of two variables without using a third variable

  • Use XOR operator

  • Addition and subtraction can also be used

  • Pointers can be used to swap values

Add your answer

Q61. Are you open to learning new technologies?

Ans.

Yes, I am open to learning new technologies as it helps me stay updated and grow in my career.

  • I believe in continuous learning and adapting to new technologies

  • I am always eager to expand my skill set and knowledge

  • Learning new technologies can open up new opportunities and challenges for me

Add your answer

Q62. What is Normalization in SQL?

Ans.

Normalization in SQL is the process of organizing data in a database to reduce redundancy and improve data integrity.

  • Normalization involves breaking down a database into smaller, more manageable tables and defining relationships between them.

  • It helps in reducing data redundancy by storing data in a structured and organized manner.

  • Normalization ensures data integrity by preventing anomalies such as insertion, update, and deletion anomalies.

  • There are different normal forms such...read more

Add your answer

Q63. What is the operating system in your laptop?

Ans.

The operating system in my laptop is Windows 10.

  • My laptop runs on Windows 10 operating system.

  • Windows 10 is a popular operating system developed by Microsoft.

  • It has a user-friendly interface and supports a wide range of software applications.

  • Some of the key features of Windows 10 include Cortana, Microsoft Edge, and virtual desktops.

Add your answer

Q64. Write a program to count deleted char in your name

Ans.

A program to count the number of deleted characters in a given name.

  • Create a variable to store the count of deleted characters.

  • Loop through each character in the name.

  • If the character is not present in the name, increment the count variable.

  • Return the count variable.

Add your answer

Q65. Tell me the definition of a class

Ans.

A class is a blueprint for creating objects that have similar attributes and behaviors.

  • A class is a user-defined data type that encapsulates data and functions.

  • It defines the attributes and methods that an object of that class will have.

  • Objects are instances of a class.

  • Classes can inherit properties and methods from other classes.

  • Example: A class 'Car' can have attributes like 'color', 'model', and methods like 'start', 'stop'.

Add your answer

Q66. What is encapsulation. Explain it with example

Ans.

Encapsulation is the concept of bundling data and methods that operate on the data into a single unit, known as a class.

  • Encapsulation helps in hiding the internal state of an object and restricting access to it.

  • It allows for data hiding, which prevents direct access to an object's attributes.

  • Encapsulation also helps in achieving data abstraction, where only necessary details are exposed to the outside world.

  • Example: In a class representing a car, the variables like speed and ...read more

Add your answer

Q67. Write code for cube of number , prime number , sorting , DBMS related , SQL.

Ans.

Code for cube of number, prime number, sorting, DBMS related, SQL

  • Cube of a number: num*num*num

  • Prime number: check if num is divisible by any number from 2 to num-1

  • Sorting: use built-in sorting functions or implement bubble sort, merge sort, quick sort, etc.

  • DBMS related: learn about database design, normalization, SQL queries, etc.

  • SQL: use SQL commands to create, modify, and query databases

Add your answer

Q68. Create Login page using html, css and js

Ans.

Create a login page using HTML, CSS, and JS

  • Use HTML for structure and form elements

  • Style the page using CSS for layout and design

  • Implement client-side validation using JavaScript

  • Handle form submission and authentication using JS

Add your answer

Q69. What do you mean by abstraction

Ans.

Abstraction is the process of hiding complex details and showing only essential features of an object or system.

  • Abstraction helps in managing complexity by breaking down a system into smaller, more manageable parts.

  • It allows us to focus on the important aspects of a system while ignoring the irrelevant details.

  • Abstraction is used in programming to create classes and objects that represent real-world entities.

  • For example, a car object can have properties like make, model, and ...read more

Add your answer

Q70. Write any sorting technique with your preferred language.

Ans.

One sorting technique is Bubble Sort in Python.

  • Initialize a flag to track if any swaps are made in a pass

  • Repeat until no swaps are made: Compare adjacent elements and swap if necessary

  • Example: def bubble_sort(arr): for i in range(len(arr)): for j in range(0, len(arr)-i-1): if arr[j] > arr[j+1]: arr[j], arr[j+1] = arr[j+1], arr[j]

Add your answer

Q71. Write a program to print a Fibonacci series

Ans.

Program to print Fibonacci series in Python

  • Initialize variables for first two numbers in the series (0 and 1)

  • Use a loop to calculate and print the next number by adding the previous two numbers

  • Continue the loop until the desired number of terms is reached

View 1 answer

Q72. Write a program to find Simple Interest?

Ans.

Program to calculate Simple Interest

  • Take input of principal amount, rate of interest and time period

  • Calculate simple interest using formula: (P * R * T) / 100

  • Display the calculated simple interest

Add your answer

Q73. How do you traverse linked list?

Ans.

Traversing a linked list involves iterating through each node starting from the head node.

  • Start at the head node

  • Iterate through each node by following the 'next' pointer

  • Stop when reaching the end of the list (next pointer is null)

Add your answer

Q74. Write a sample sql query to fetch data from two tables

Ans.

SQL query to fetch data from two tables

  • Use JOIN keyword to combine data from two tables

  • Specify the columns you want to retrieve in the SELECT statement

  • Use ON clause to specify the relationship between the tables

Add your answer

Q75. Which programming language do you know?

Ans.

I know multiple programming languages including Java, Python, and C++.

  • Proficient in Java with experience in developing web applications using Spring framework

  • Familiar with Python for data analysis and machine learning

  • Experience in C++ for competitive programming and algorithm development

Add your answer

Q76. Who is CEO of TCS?

Ans.

Rajesh Gopinathan is the CEO of TCS.

  • Rajesh Gopinathan took over as CEO of TCS in 2017.

  • He has been with TCS since 2001 and has held various leadership roles.

  • Under his leadership, TCS has continued to grow and expand globally.

Add your answer

Q77. What is DDL,DML &amp; DCL commands?

Ans.

DDL, DML, and DCL are SQL commands used to manipulate databases.

  • DDL (Data Definition Language) commands are used to create, modify, and delete database objects such as tables, indexes, and views.

  • DML (Data Manipulation Language) commands are used to insert, update, and delete data in a database.

  • DCL (Data Control Language) commands are used to control access to the database, such as granting or revoking permissions.

  • Examples of DDL commands include CREATE TABLE, ALTER TABLE, and...read more

Add your answer

Q78. What do you mean by OOPS

Ans.

OOPS stands for Object-Oriented Programming System

  • OOPS is a programming paradigm that focuses on objects and their interactions

  • It allows for encapsulation, inheritance, and polymorphism

  • Encapsulation refers to the bundling of data and methods within a single unit

  • Inheritance allows for the creation of new classes based on existing ones

  • Polymorphism allows for the use of a single interface to represent multiple types of objects

Add your answer

Q79. Tell me about python?

Ans.

Python is a high-level, interpreted programming language known for its simplicity and readability.

  • Python is dynamically typed and supports multiple programming paradigms.

  • It has a large standard library and a vast collection of third-party modules.

  • Python is widely used in web development, scientific computing, data analysis, and artificial intelligence.

  • Some popular frameworks and libraries in Python include Django, Flask, NumPy, and TensorFlow.

Add your answer

Q80. What is pointers and it's types?

Ans.

Pointers are variables that store memory addresses. They can be used to manipulate data and improve program efficiency.

  • There are four types of pointers: null pointers, void pointers, function pointers, and pointer to pointers.

  • Example: int *ptr; // declares a pointer to an integer

  • Example: int **ptr; // declares a pointer to a pointer to an integer

Add your answer

Q81. Reason for Background change ie from Mechanical to IT

Ans.

Passion for technology and interest in IT led to transition from Mechanical to IT field.

  • Discovered passion for technology and IT during college courses

  • Realized interest in coding and software development

  • Opportunity to work on IT projects during internships

  • Belief in the growth and opportunities in the IT industry

Add your answer

Q82. What is this keyword in python ?

Ans.

The 'this' keyword in Python refers to the current instance of the class.

  • Used to refer to the current instance of the class

  • Can be used to access variables and methods of the current instance

  • Used inside a method of a class

  • Example: self.variable_name or self.method_name()

Add your answer

Q83. What do you know about DBMS?

Ans.

DBMS stands for Database Management System. It is a software system that allows users to define, create, maintain and control access to databases.

  • DBMS is used to manage large amounts of data efficiently.

  • It provides a way to store, retrieve and manipulate data in a structured manner.

  • It ensures data integrity and security.

  • Examples of DBMS include MySQL, Oracle, SQL Server, and PostgreSQL.

Add your answer

Q84. Tell about OOPS concepts in brief.

Ans.

OOPS concepts refer to Object-Oriented Programming concepts which include Inheritance, Encapsulation, Polymorphism, and Abstraction.

  • Inheritance: Allows a class to inherit properties and behavior from another class.

  • Encapsulation: Bundling data and methods that operate on the data into a single unit.

  • Polymorphism: Ability to present the same interface for different data types.

  • Abstraction: Hiding the complex implementation details and showing only the necessary features.

Add your answer

Q85. What is a map ?

Ans.

A map is a visual representation of an area, showing physical features, roads, and other details.

  • A map can be used for navigation and orientation.

  • It can show geographical features such as mountains, rivers, and lakes.

  • Maps can also display man-made features such as roads, buildings, and landmarks.

  • Different types of maps include topographic, political, and weather maps.

  • Maps can be created using various tools such as GPS, satellite imagery, and cartography software.

Add your answer

Q86. What are preprocessor in C language

Ans.

Preprocessors are directives that are executed before the compilation of the program.

  • Preprocessors start with a # symbol.

  • They are used to include header files, define constants, and perform conditional compilation.

  • Examples of preprocessor directives are #include, #define, #ifdef, #ifndef, #endif.

  • Preprocessors are executed before the actual compilation of the program.

  • They are used to modify the source code before it is compiled.

Add your answer

Q87. How java and python are different?

Ans.

Java is a statically typed language with a strong emphasis on object-oriented programming, while Python is dynamically typed and focuses on simplicity and readability.

  • Java is statically typed, while Python is dynamically typed

  • Java is strongly typed, while Python is weakly typed

  • Java is compiled to bytecode and runs on a virtual machine, while Python is interpreted

  • Java has a strong emphasis on object-oriented programming, while Python supports multiple programming paradigms

  • Java...read more

Add your answer

Q88. Difference between C,C++ Describe your Projects Oops concepts

Ans.

Difference between C and C++, Projects, and OOPs concepts

  • C is a procedural language while C++ is an object-oriented language

  • C++ supports features like inheritance, polymorphism, and encapsulation

  • Projects: developed a calculator using C++, a file management system using C

  • OOPs concepts: Abstraction, Encapsulation, Inheritance, Polymorphism

Add your answer

Q89. Why cilling fans are dual phase ?

Ans.

Ceiling fans are dual phase to improve efficiency and reduce energy consumption.

  • Dual phase fans have two sets of windings for better control of speed and direction

  • They provide smoother operation and reduce noise levels

  • Dual phase fans are more energy efficient compared to single phase fans

  • Examples of dual phase ceiling fans include those with remote control and variable speed settings

Add your answer

Q90. What is SDLC in software engineering?

Ans.

SDLC stands for Software Development Life Cycle, which is a process used by software developers to design, develop, and test high-quality software.

  • SDLC is a structured process that consists of several phases including planning, analysis, design, implementation, testing, and maintenance.

  • Each phase in the SDLC has its own set of activities and deliverables that must be completed before moving on to the next phase.

  • Examples of SDLC models include Waterfall, Agile, and DevOps, eac...read more

Add your answer

Q91. Explain how a diode works, write simple c program

Ans.

A diode is an electronic component that allows current to flow in one direction and blocks it in the opposite direction.

  • A diode has two terminals: an anode and a cathode.

  • When the voltage across the diode is positive, it conducts current.

  • When the voltage across the diode is negative, it blocks current.

  • Diodes are commonly used in rectifier circuits to convert AC to DC.

  • A simple C program to control a diode can be written using GPIO pins on a microcontroller.

Add your answer

Q92. On which protocol REST apis work.

Ans.

REST APIs work on the HTTP protocol.

  • REST APIs use HTTP methods like GET, POST, PUT, DELETE.

  • They rely on URLs to access resources.

  • Responses are typically in JSON or XML format.

  • Example: GET request to 'https://api.example.com/users' to retrieve user data.

Add your answer

Q93. Dbms joins and what are networks ip

Ans.

DBMS joins are used to combine data from multiple tables. IP addresses are unique identifiers assigned to devices on a network.

  • DBMS joins are used to retrieve data from multiple tables based on a common column

  • There are different types of joins such as inner join, outer join, left join, right join

  • IP addresses are used to identify devices on a network and allow them to communicate with each other

  • IP addresses are unique and consist of four numbers separated by dots, such as 192....read more

Add your answer

Q94. What is a tree ?

Ans.

A tree is a perennial plant with a single stem or trunk, supporting branches and leaves.

  • Trees are typically tall and have a woody stem.

  • They have roots that anchor them to the ground and absorb water and nutrients.

  • Trees provide oxygen, shade, and habitat for animals.

  • Examples of trees include oak, maple, pine, and palm trees.

Add your answer

Q95. What is an abstract class?

Ans.

An abstract class is a class that cannot be instantiated and is meant to be subclassed.

  • An abstract class can have abstract and non-abstract methods.

  • Abstract methods have no implementation and must be implemented by the subclass.

  • A class can only extend one abstract class but can implement multiple interfaces.

  • Example: Animal is an abstract class with abstract method 'makeSound'. Dog and Cat are subclasses that implement 'makeSound'.

Add your answer

Q96. Difference Between Method and Constructor?

Ans.

A method is a function that belongs to a class and can be called to perform a specific task. A constructor is a special method used to initialize an object when it is created.

  • Methods are defined within a class and can be called using an object of that class.

  • Constructors are used to initialize the state of an object and are automatically called when an object is created.

  • Methods can have return types and parameters, while constructors do not have return types and have the same ...read more

View 1 answer

Q97. models in s/w development lifecycle?

Ans.

Models are used in software development lifecycle to plan, design, implement and test software.

  • Models help in visualizing the software development process

  • They provide a framework for organizing and managing the development process

  • Some popular models include Waterfall, Agile, Spiral, and V-Model

  • Each model has its own advantages and disadvantages

  • Choosing the right model depends on the project requirements and constraints

Add your answer

Q98. Describe the user of Classes and Interfaces.

Ans.

Classes and interfaces are used to define objects and their behavior in object-oriented programming.

  • Classes are used to define objects with properties and methods.

  • Interfaces are used to define a set of methods that a class must implement.

  • Classes can inherit properties and methods from other classes.

  • Interfaces can be implemented by multiple classes.

  • Classes and interfaces promote code reusability and modularity.

Add your answer

Q99. Create a simple form with HTML

Ans.

Create a simple form with HTML

  • Use the <form> tag to create the form

  • Add <input> tags for different form fields like text, email, password, etc.

  • Include a submit button using <input type='submit'>

Add your answer

Q100. What is the N queen problem?

Ans.

The N queen problem is a classic problem of placing N chess queens on an N×N chessboard so that no two queens attack each other.

  • In the N queen problem, the challenge is to place N queens on an N×N chessboard in such a way that no two queens threaten each other.

  • Queens can move horizontally, vertically, and diagonally, so the placement must ensure no two queens share the same row, column, or diagonal.

  • The problem can be solved using backtracking algorithms like recursive depth-f...read more

Add your answer
1
2
3
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Marks & Spencer

based on 237 interviews
6 Interview rounds
Aptitude Test Round
Technical Round - 1
Technical Round - 2
HR Round - 1
HR Round - 2
HR Round - 3
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Assistant System Engineer Trainee Interview Questions from Similar Companies

3.9
 • 17 Interview Questions
View all
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter