Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

51.

Name a function of MySql which is used to remove trailing and leading spaces from a string.

Answer»

TRIM() function.

52.

State difference between date functions NOW( ) and SYSDATE( ) of MySql.

Answer»

NOW() returns a constant time that indicates the time at which the statement began to execute. (Within a stored function or trigger, NOW() returns the time at which the function or triggering statement began to execute.) This differs from the behavior for SYSDATE (), which returns the exact time at which it executes.

53.

What is the purpose of ALTER TABLE command in MySQL? How is it different from UPDATE command?

Answer»

ALTER TABLE command is used to modify the structure of a table.

ALTER TABLEUPDATE TABLE
It is a DDL command.It is a DML command
Changes the table structure.Changes the values of  tuples in a table.
Syntax: ALTER TABLE <> ADD COLUMN <> <>.UPDATE TABLE <> SET <> = <>.

54.

Write MySql command to create the table DEPARTMENT with given constraints.COLUMN_NAMEDATATYPE(SIZE)CONSTRAINTDepartmentlDInt (4)Primary KeyDepNameVarchar (50)Not NullManagerIDChar (4)LocationVarchar (30)

Answer»

CREATE TABLE DEPARTMENT (DepartmentlD INT(4) PRIMARY KEY DepName VARCHAR(50) NOT NULL, ManagerlD CHAR(4), Location VARCHAR(30));

55.

Write MySQL command that will be used to open an already exiting database "CONTACTS".

Answer»

USE CONTACTS;

56.

Does MySQL allow to change the primary key in all cases? If there is some special case, please mention.

Answer»

Yes, MySQL allow to change the primary key in all cases.

57.

Ms. Mirana wants to remove the entire content of a table "BACKUP" along with its structure to release the storage space. What MySQL statement should she use?

Answer»

DROP TABLE BACKUP;

58.

Saumya had previously created a table named 'Product' in a database using MySQL. Later on she forgot the table structure. Suggest her suitable MySQL command through which she can check the structure of the already created table.

Answer»

DESCRIBE Product (or) DESC Product

59.

Write MySQL command to open an existing database.

Answer»

USE <database name>;

60.

Kuhu has already created a table 'Hospital' as shown below :Patient_NoPatient_NameDiseaseAgeChargesP001AlyaViral Fever14500P002KavitaLung Infection161500P003ManyaCough and Cold20500P004AmarBone Fracture222500P005DeepViraI Fever15500Now she wants to add a new column 'Address' to the above given table. Suggest suitable MySQL command for the same.

Answer»

Alter table Hospital add Address Varchar(20);

61.

Write SQL query to create a table'Train with the following structure :FieIdTypeConstraintMetroIDIntegerPrimary keyOriginVarchar (50)DestinationVarchar (5)DistanceInteger

Answer»

Create Table Train

MetroID integer Primary Key,

Origin Varchar (50),

Destination Varchar (50),

Disiance Integer

62.

Write SQL query to create a table 'Player' with the following structure :FieldTypeConstraintplayeridIntegerPrimary KeynameVarchar (50)heightIntegerweightIntegerdatebirthDateteamnameVarchar (50)

Answer»

CREATE TABLE Player(playerld integer PRIMARY KEY name varchar(S0), height integer, weight integer, datebirth date, teamname varchar(50));

63.

Write SQL query to create a table 'Event' with the following structure :FieldTypeConstraintEventldVarchar(5)PRIMARY KEYEventNameVarchar(30)NOT NULLLocationVarchar(50)ClientlDIntegerEventDateDate

Answer»

Create Table Event (Eventld Varchar (5) Primary Key, EventName varchar (30), Not NULL;  Location Varchar (50), ClientlD Integer, EventDate Date).

64.

Sharmila wants to make the database named 'COMPANY' active and display the names of all the tables in it. Write MYSQL commands for it.

Answer» USE COMPANY;

SHOW TABLES;
65.

Roli wants to list the names of all the tables in her database named 'Gadgets'. Which command (s) she should use to get the desired result.

Answer»

USE Gadgets;

SHOW TABLES;

66.

Write SQL query to create a table 'Song' with the following structure :FieldTypeConstraintSongidIntegerPrimary keyTitleVarchar(50)DurationIntegerReleaseDateDate

Answer»

Create Table Song 

(Songid Int Primary Key, Title Varchar (50), Duration Int, ReleaseDate Date);

67.

Write SQL query to create a table "Job" with the following structure :                        Table:JobField nameData typeSizeConstraintJ_CodeInteger3Primary KeyJ_DescriptionVarchar25NotNullJ_Chg_HrIntegerJ_LastupdateDate

Answer»

Create table Job

J_Code Integer(3) Primary Key,

J_Description Varchar(25) Not Null,

J_Chg_Hr Integer,

J_Lastupdate Date);

68.

Write SQL query to create a table'Bank_Customer' with the following structure :FieldTypeConstriantAcc_NoIntegerPrimary KeyCust_NameVarchar (20)Not NullCust_AddVarchar (20)Cust_CityVarchar (20)

Answer»

Create Table Bank_Customer (Acc_No Integer Primary key, Cust_Name Varchar(20) Not null, Cust_Add Varchar(20), Cust-City Varchar(20) );

69.

In a database there are two tables'CD' and 'TYPE' as shown below :                    Table : CDCodeTitleDurationSingerCategory101Sufi Songs50 minZakir Faiz12102Eureka45 minShyama Mukherjee12103Nagmey23 minSonvi kumar77104Dosti35 minBobby1                        Table : TypeCategoryDescription1Jazz12Classical40Country Side78Pop(i) Name the Primary key in "CD" table.(ii) Name the foreign key in "CD" table.(iii) Write the Cardinality and Degree of "TYPE" table.(iv) Check every value in CATEGORY column of both the tables. Do you find any discrepancy ? State the discrepancy.(v) Write SQL statement to change the name of Singer "Sonvi Kumar" to "Sonvi Mehra" in all the places wherever it occurs in CD table.(vi) Write MySQL statement to add a column "Music_Director" which datetype Varchar and size as 30 in the table "CD".(vii) Write command in SQL to display code, Title and corresponding description of all the CDs.

Answer»

(i) Code

(ii) Category

(iii) Cardinality : 4 Degree : 2

(iv) Category 77 is not present in Category table. R-eferential integrity doesn't exist.

(v) UPDATE CD SET Singer='Sonvi Mehra' where Singer like 'Sonvi kumar';

(vi) ALTER TABLE CD ADD COLUMN Music _Director Varchar(30);

(vii) SELECT CODE, TITLE, DESCRIPTION FROM CD, TYPE WHERE CD.CATEGORY = TYPE CATEGORY;

70.

Write a MySQL command to create the table STOCK including its constraints.                            Table : STOCKName of ColumnTypeSizeConstraintIDDecimal4Primary KeyNameVarchar20CompanyVarchar20PriceDecimal8Not Null

Answer»

CREATE TABLE STOCK(Id Decimal(4) PRIMARY KEY, Name VARCHER(20), Company VARCHER(20), PRICE DECIMAL(8) NOT NULL);

71.

Write MYSQL command to create the table SHOP with given structure and constraint :                    Table: SHOPColumn_NameData Type(size)ConstraintFnoInt (10)Primary KeyFnameVarchar (15)TypeChar (10)StockInt (3)PriceDecimal (8, 2)

Answer»

CREATE TABLE SHOP(Fno int(10) Primary Key, Fname Varchar(15), Type Char(10), Stock int(3), Price decimal(8,2));

72.

Write SQL command to remove column named 'Hobbies' from a table named 'Student' .

Answer»

ALTER TABLE Student DROP Hobbies

73.

Write a SQL query to create the table 'SALESPERSON' with the following structure :                    Table: SALESPERSONFieldTypeSizeConstraintSCODEDecimal6Primary KeyFIRST NAMEVarchar30Not NullLAST NAMEVarchar30Not NullCITYVarchar30SALESDecimal8

Answer»

CREATE TABLE SALESPERSON (SCODE Decimal( 6) Primary Key, FIRSTNAME,Varchar(30) NOTNULL, LASTNNAME Varchar(30) Not NULL, CITY Varchar(30), SALES Decimal(8));

74.

Write a MYSQL command for creating a table "BANK " whose structure is given below.Field NameDatatypeSizeConstraintAcct_NumberInteger4Primary KeyNameVarchar3BirthDateDateBalanceInteger8Not Null

Answer»

CREATE TABLE BANK (Acct_Number INTEGER(4) PRIMARY KEY, Name VARCHAR(3), BirthDate DATE, Balance INTEGER(8) NOTNULL);

75.

What are the differences between DELETE and DROP commands of SQL?

Answer»
DELETEDROP
(i) DML command(i) DDL command
(ii) Deletes the content of the table.(ii) Deletes the contents and the true of the table.
(iii) DELETE FROM <tablename> WHERE <condition>.(iii) DROP TABLE<Tablename>

76.

On the basis of the Table Pharma; write the output(s) produced by executing the following queries :(i) SELECT RXID, DrugName, Price from PharmaDB rvhere PharmacyName IN ('Rx Parmacy", "Raj Medicos");(ii) SELECT PharmacyName, COUNT(*) FROM PharmaDB GROUP BY PHARMACY NAME;

Answer»

(i)

RxIDDrugNamePrice
R1000Amlodipine100.00
R1001Paracetamol15.00
R1004Levocitrezine110.00

(ii) 

PharmacyNameCOUNT(*)
Rx Pharmacy2
Raj Medicos1
My Chemist2

77.

Consider table 'BooK. Write SQL statement to change the price for the BOOK titled 'Informatics made fun' to 200?BCodeTitlePrice101ABC of Physics300102Informatics made fun250103Computers are simple375

Answer»

Update Book set Price = 200

where Title = 'Informatics made fun'.

78.

Consider the table'Employee'.             EmployeeNameLocationGurpreetMumbaiJatinderChennaiDeepaMumbaiHarshChennaiSimiNew DelhiAnitaBengaluruWrite the SQL command to obtain the following output :       LocationMumbaiChennaiNew DelhiBengaluru

Answer»

SELECT DISTINCT  Location FROM Employee;

79.

Write the equivalent of following SQL statement using IN operator.SELECT STOREID, SUM(SALESAMOUNT) FROM SALES WHERE STOREID = 25 OR STOREID  = 40;

Answer»

SELECT STOREID, SUM (SALESAMOUNT) FROM SALES WHERE STORE ID IN (25,40).

80.

How is ALTER TABLE statement different from CREATE TABLE statement ?

Answer»

ALTER TABLE modify the existing table structure CREATE TABLE creates a new table.

81.

Consider the table 'empsalary'.          ID          Salary     10143000'102Null10456000107NullTo select tuples with some salary ,Siddharth has written the following erroneous SQL statement: SELECT ID, Salary FROM empsalary WHERE Salary = something;Write the correct SQL statement.

Answer»

SELECT ID, Salary FROM empsalary WHERE Salary is NOT NULL;

82.

Consider the table 'Company'. XYZ wanted to display the highest salary of each department along with department names.                     Table: CompanyEMPIDDEPARTMENTSALARYE101PERSONNEL60,000E102PERSONNEL65,000E103MARKETING40,000E104PERSONNEL62,004E105PERSONNEL50,000E105MARKETING35,000XYZ entered the following SQL statement:Select Department, MAX (Salary)From CompanyORDER BY Department;Identify error(s) in the above SQL statement.Rewrite the correct SQL statement.

Answer»

Select Department, MAX (Salary)

From Company

Group BY Department;

83.

While creating the table Student last week, Ms. Sharma forgot to include the column Game_played. Now write a command to insert the Game_played column with VARCHAR data type and 30 size into the Student table.

Answer»

Alter,Table Student Add,(Game-played VAR, CHAR(30));

84.

Pranay, who is an Indian, created a table named "Friends" to store his friend's detail. Table "Friends" is shown below. Write commands in SQL for (i) to (iv) and output for (v) to (vii).S_No.NameAgeCityCountryEmail_ID1Alice14WashingtonUSA[email protected]2Charles12CopenhagenDenmark[email protected]3Angle16ChicagoUSA[email protected]4Jasmine15SydneyAustralia[email protected]5Raj14New DelhiIndia[email protected]6Jette13NykobingDenmark[email protected]7Alexender15MelbourneAustraliaNull8Shashank16BangaloreIndiaNull(i) To display list of all foreigner friends.(ii) To list name, city and country in descending order of age.(iii) To count how many friends have email id on gmail.(iv) To list name and city of those friends who don't have an email id.(v) Select name, country from friends where age&gt;12 and name like 'A%';(vi) Select ucase(concat(name," * ",city)) from friends where country like 'Denmark';(vii) Select mid(name,1,4) as "UID" from friends where country like 'USA';

Answer»

(i) Select Name From Friends Where Country Not Like "lndra";

(ii) Select Name, City, Country From Friends Order By Age Desc;

(iii) Select Count(*) From Friends Where Email_id like "% gmail%";

(iv) Select Name, City,  From Friends Where Email_id is null;

                          OUTPUT

NameAGECountry
Alice14USA
Angel16USA
Alexender15Austrailia

(vi)

Ucase (concat (name, "", city)
Charles *Copenhagen
Jettle*Nykobing

(vii)

uid
Alic
Angle

85.

Charvi wants to delete the records where the "First Name" is "Rama" in the 'Emp' Table. She has entered the following SQL statement. An error is being displayed. Rewrite the correct statement. DELETE 'Rama' FirstName From Emp;

Answer»

DELETE FROM Emp where First Name  = "Rama"

86.

Write the UPDATE statement in MySQL to increase commission by 100.00 in the "Commission" column in the 'Emp'  table.

Answer»

UPDATE Emp SET Commission = Commission + 100.00.

87.

Observe the given statements carefully:(i) SELECT * FROM club WHERE salary between 20000 and 30000;(ii) SELECT * FROM club WHERE salary IN ( 20000, 30000);(iii) SELECT * FROM club WHERE salary &gt; = 20000 and salary &lt; = 30000;(iv) SELECT * FROM club WHERE salary =  20000 OR salarY = 30000; Make pairs of the equivalent SQL statements given above (which give the same output) and place each pair in a group.

Answer»

Group A (i) (iii)

Group B (ii) (iv)

88.

What will be the output of the following queries on the basis of Employee table :EmpIDENameSalaryA001Bob5600A002JohnNulIA003Varchar5000(i) Select avg(Salary) from Employee;(ii) Select Salary+100 from Employee where Empld='A002';

Answer»

(i) avg(Salary) 5300.0000

(ii) Salary+100 NULL

89.

Mr. janak is using a table with following columns: Name, Class, Course _Id , Course_name. He needs to display names of students who have not been assigned any stream or have been assigned course_name that ends with "economics".He wrote the following command, which did not give the desired result.SELECT Name, Class FROM Students WHERE Course_Name = Null OR Course_name=" %economics";Help Mr. janak to run the query by removing the error and write the correct query

Answer»

SELECT Name Class FROM Students where Course_name IS NULL OR Course_name LIKE '%economics';

90.

Write two examples of DML commands of SQL.

Answer»

INSERT and UPDATE

91.

Given'Employee' table as follows :Employee_IDNameCommission101Sabhyata SharmaNull102Divya Arora8900103Faizal ZaldiNul1What values will the following statements return?SELECT COUNT(*) FROM Employee;SELECT COUNT(Commission) FROM Employee;

Answer»

3 Employee;

1 Commission Employee;

92.

Mrs. Kumar is using table STUDENTS with the following columns: RNO, ADMNO, NAME, AGGREGATE. She wants to display all information of students in descending order of name and within ascending order of aggregate. She wrote the following SQL query and she did not get the desired output.SELECT * FROM STUDENTS ORDER BY NAME, AGGREGATE DESC;

Answer»

SELECT * FROM STUDENTS ORDER BY AGGREGATE, NAME DESC;

93.

Table "Sports" is shown below. Write statements in SQL for (i) to (iv) and output for (v) and (vi)                         Table: SportsStudentIdNameGenderDateAdmitGameFeeS101Anisha ThakurF2015-09-12Badminton34000S102tipti SalujaF2015-08-12Lawn Tennis50000S103Divya SharmaF2015-11-01Badminton55000S104FauziaZarF2015-12-09Lawn Tennis60000S105Richard DesouzaM2015-12-10Cricket50000(i) To display all details of Students who have enrolled for 'Badminton' coaching.(ii) To display names of girl students who have enrolled for 'Lawn Tennis'.(iii) To display names of students, game enrolled, fee in ascending order of fee being paid by them.(iv) To game name and number of students enrolled in each game.(v) SELECT Name, Game, Fee FROM Sports WHERE Fee BETWEEN 50000 AND 60000.(vi) SELECT Name, DateAdmit FROM Sports WHERE DateAdmit &lt; '2015-12-09'.

Answer»

(i) Select * From Sports Where Game like 'Badminton'.

(ii) Select Name from Sports where Gender =  'F' and Game = 'Lawn Tennis'.

(iii) Select Name, Game, Fee From Sports Order By Fee.

(iv) Select Game, Count (Studentld) from Group By Game.

(v)

NameGameFee
Tipti SalujaLawn Tennis50000
Divya SharmaBadminton55000
Fauzia ZarLawn Tennis60000
Richard DesouzaCricket50000

(vi)   Name                        DateAdmit

       Tripti Saluja                 2015-08-15

94.

Sarthak, a student of class XII, created a table "Class". Grade is one of the columns of this table. To find the details of students whose Grades have not been entered, he wrote the following MySQL query, which did not give the desired result.SELECT * FROM Class where GRADE = "Null";Help Sarthak to run the query by removing the errors from the query and write the correct Query.

Answer»

SELECT * FROM Class WHERE Grade IS NULL; 

95.

Consider the following table :                          Table: PharmaDBRxIDDrugIDDrugNamePricePharmacy NamePharmacylocationR10005476Amlodipine100.00Rx PharmacvPitampura, DelhiR10012345Paracetamol15.00Raj MedicosBahadurgarh, HaryanaR10021235Nebistar60.00Mv ChemistRajouri Garden, DelhiR10036512Vita Plus150.00My ChemistCurgaon, HaryanaR10045631Levocitrezine110.00Rx PharmacySouth Extension, DelhiWrite commands in SQL for (i) to (iv):(i) To increase the price of "Amlodipine" by 50.(ii) To display all those medicines whose price is in the range 100 to 150.(iii) To display the Maximum price offered by pharmacy located in "Gurgaon"(iv) To display the Drug ID, DrugName and Pharmacy Name of all the records in descending order of their price.

Answer»

(i) Update PharmaDB set Price = price+50 Where DrugName = "Amlodipine";

(ii) Select * From PharmaDB where price between 100 and 150;

(iii) Select Max(Price) from pharmaDB where Pharmacylocation like  "% Gurgaon %" ;

(iv) Select Drug ID, DrugName, pharmacyName from PharmaDB order by price desc;

96.

Consider the following table named "GARMENT"' Write command of SQL for (i) to (iv) and output for (v) to (vii).                            Table : GarmentGcodeGNameSizeColourPrice111TshirtXLRed1400112JeansLBlue1600113SkirtMBlack1100114Ladies JacketXLBlue4000115TrousersLBrown1500116Ladies TopLPink1200(i) To display names of those garments that are available 'XL' size.(ii) To display codes and names of those garments that have their name starting with 'Ladies'.(iii) To display garment names, codes and prices of those garments that have price in the range 1000.00 to 1500.00 (both 1000.00 and 1500.00 included).(iv) To change the colour of garment with code as 116 to "Orange".(v) SELECT COUNT(DISTINCT (SIZE)) FROM GARMENT;(vi) SELECT AVG (PRICE) FROM GARMENT;(vii) SELECT GNAME FROM GARMENT WHERE SIZE IN ('M', 'L') AND PRICE &gt; 1500;

Answer»

(i) SELECT GName FROM Garment Where Size='XL'

(ii) SELECT Gcode, Gname FROM Garment- WHERE Name LIKE "Ladies%";

(ii) SELECT Gcode, Gname, Price FROM Garment WHERE Price BETWEEN 1000 and 1500;

(iv) UPDATE Garment SET Colour ='Orange' WHERE Gcode=116;

(v) 3

(vi) 1800

(vii) Jeans

97.

Pranay, who is an Indian, created a table named "Friends" to store his friend's detail. Table "Friends" is shown below. Write commands in SQL for (i) to (iv) and output for (v) to (vii).S_No.NameAgeCityCountryEmail_ID1Alice14WashingtonUSA[email protected]2Charles12CopenhagenDenmark[email protected]3Angle16ChicagoUSA[email protected]4Jasmine15SydneyAustralia[email protected]5Raj14New DelhiIndia[email protected]6Jette13NykobingDenmark[email protected]7Alexender15MelbourneAustraliaNull8Shashank16BangaloreIndiaNull(i) To display list of all foreigner friends.(ii) To list name, city and country in descending order of age.(iii) To count how many friends have email id on gmail.(iv) To list name and city of those friends who don't have an email id.(v) Select name, country from friends where age&gt;12 and name like 'A%';(vi) Select ucase(concat(name," * ",city)) from friends where country like 'Denmark';(vii) Select mid(name,1,4) as "UID" from friends where country like 'USA';

Answer»

(i) Select Name From Friends Where Country Not Like "lndra";

(ii) Select Name, City, Country From Friends Order By Age Desc;

(iii) Select Count(*) From Friends Where Email_id like "% gmail%";

(iv) Select Name, City,  From Friends Where Email_id is null;

                          OUTPUT

NameAGECountry
Alice14USA
Angel16USA
Alexender15Austrailia

(vi)

Ucase (concat (name, "", city)
Charles *Copenhagen
Jettle*Nykobing

(vii)

uid
Alic
Angle

98.

Rewrite the following SQL statement after correcting error(s). Underline the corrections made. INSERT IN STUDENT(RNO,MARKS) VALUE (5, 78.5);

Answer»

INSERT INTO STUDENT(RNO, MARKS) VALUES (5,78.5);

99.

Consider the table FLIGHT given below Write commands in SQL for (i) to (iv) and output for (v) to (vii).                              TABLE: FLIGHTFLCODESTARTDESTINATIONNO_ STOPSNO_FLIGHTSIC101DelhiAgartala15IC102MumbaiSikkim13IC103DelhiJaipur07IC105KanpurChennai22IC107MumbaiKanpur04IC431IndoreChennai32IC721DelhiAhmedabad26(i) Display details of all flights starting from Delhi.(ii) Display details of flights that have more than 4 number of flights operating.(iii) Display flight codes, starting place, destination, number of flights in descending order of number of flights.(iv) Display destinations along with flight codes of all the destinations starting with 'A'.(v) SELECT MAX(NO_FLIGHTS) FROM FLIGHT(vi) SELECT DISTINCT(NO_STOPS) FROM FLIGHT(vii) SELECT START COUNT(.) FROM FLIGHT GROUP BY Start;

Answer»

(i) SELECT * FROM FLIGHT WHERE START = 'Delhi'

(ii) SELECT * FROM FLIGHT WHERE NO _FLIGHTS > 4

(iii) SELECT FLCODE, START, DESTINATION, NO-FLIGHTS FROM FLIGHT ORDER BY NO-FLIGHTS DESC

(iv) SELECT DESTINATION, FLCODE FROM FLIGHT WHERE DESTINATION LIKE "A%";

(v) MAX(No_FLIGHTS)

7

(vi) DISTINCT(NO_STOPS)

0

1

2

3

(vii) DELHI 3 MUMBAI 2 KANPUR 1 INDORE 1

100.

Write commands in SQL for (i) to (iv) and outPut for (v) and (vi),                                Table : Store    StoreldNameLocationCityNo Of EmployeesDateOpenedSalesAmountS101PlanetfashionKarol BaghDelhi72015-10-16300000S102TrendsNehru NagarMumbai112015-08-09400000S103VogueVikas ViharDelhi102015-06-27200000S104SuperfashionDefence ColonyDelhi82015-02-18450000S105RageBandraMumbai52015-09-22600000(i) To display name, location, city, SalesAmount of stores in descending order of SalesAmount.(ii) To display names of stores along with SalesAmount of those stores that have 'fashion' anywhere in their store names.(iii) To display Stores names, Location and Date Opened of stores that were opened before 1st March, 2015.(iv) To display total SalesAmount of each city along with city name.(v) SELECT distinct city FROM store;(vi) SELECT Name, length (name), left (name,3) From Store where NoOfEmployees&lt;3;

Answer»

(i) Select Name, Location, City, SalesAmount From Store Order By SalesAmount desc.

(ii) select Name, salesAmount From store where Name like '% fashion%'

(iii) Select Name, Location, Date Opened From Store Where Date Opened <'2015 -03 - 01'

(iv) Select SVM (SalesAmount), City from store group by City'

(v) distinct (CitY) Delhi Mumbai

(vi) Name, length (name) left (name, 3) No. output