Wipro Interview Questions

Wipro Interview

All datails about company

Wipro Interview Questions and Answers
Company Overview:
Wipro Limited is one of the leading global information technology services corporation. It’s headquarter is situated in Bangalore, and “Abidali Neemuchwala” is the present CEO.

Wipro works on the philosophy “think and implement” which helps the clients to do business better.

Wipro limited (western India palm refined oils limited) founded by “M.H. Hasham Premji” on 29 December 1945. It is the western India Product Company, and it has come into existence with a business unit of vegetable oil. Later, it was diversified into the manufacturing of soaps and other consumer products services. It was ventured into IT and computing industry in 1981.

Now a day, this Company is recognized globally for fast services, a strong commitment to sustainability and good corporate citizenship, they have over 160,000 dedicated employees serving clients across six continents.

These are some essential services provided by Wipro limited:

Analytics, Application development, cloud computing and IT infrastructure services, digital operation and platform services, and product engineering services.

Wipro Eligibility Criteria for Engineering Candidates
Graduation Criteria
Note: The candidates who are looking for the full-time job will be considered only.
B.E / B.Tech in all stream (ME/CIVIL/CSE/EEE etc.)
Engineering candidates of 2018 batch are eligible to apply.
Academic Criteria for Wipro:
The candidate should have more than 60% marks throughout the academics (Marks will be considered in points, so the candidates having 59.9 % will not be taken into consideration)
The candidate shouldn’t carry any current backlogs at the time of appearing for Wipro selection process.
The graduation must be a Full-Time course recognized by the Central/State government of India.
The candidate must have completed all the exit formalities in the previous organization before joining Wipro (if any).
Wipro Policies:
If the candidate has attended an interview within the past six months from the date of the new application, then he/she is not eligible to apply.
If the candidate’s application has terminated by Wipro for some reason, then the candidate is not eligible to apply.
If the candidate misses the opportunity to give the interview for any reason in that case the candidate has the right to apply again and can attend the selection process.
Documents required:
The candidate should have to carry all the original mark sheets, and Xerox related to SSC (10th), intermediate (12th) and Graduation are required to be produced at the time of interview.
A copy of updated resume.
Passport size photographs.
An original ID proof issued by the government of India (Aadhar Card, Pan Card, Voter ID, Passport, etc.)
Wipro Recruitment Process
As per my observation, the Company conducts three rounds for the selection process.

These rounds are as follows:

Written Exam
Technical Interview
HR Interview
Note: Every round is the elimination round so the candidate must have to clear all these rounds.
Wipro Written Exam Pattern
Paper Section
No. of questions
Cut Off Percentile
Negative Marking
Verbal
16
60%
No
Aptitude
13
60%
No
Reasoning
12
60%
No
Coding
2 Questions
50%
No
English Test
Less than 5 Mistakes
70%
No
Wipro Verbal Interview Questions
1) Find the synonym for ostentatious.
Glittery
Moderate
Calm
Cultivate
Show Answer
Pause

Next
Mute
Current Time
0:58
/
Duration
18:10

Fullscreen

2) The immensely _ title character was the epitome of greed: he was so _ that he precisely sold his daughter to the highest bidder.
Gregarious, avid
Rapacious, avaricious
Conventional, orthodox
Gluttonous, clever
Show Answer

3) Find the antonym for “focus.”
Fixate
Disorganize
Converge
Concentrate
Show Answer
Fill in the blanks by using the given set of words to make the complete sentence.

4) Fill in the blank: The person declined to fawn_________ the feet of his master.
at
to
about
onto
Question 5 and 6 consists of two words each that have a specific relationship to each other, select the words pair that has the same relationship as the original pair of words.

5) Animals : Oil
Cow : Milk
Plants : Coal
Produce : Manure
Fire : Smoke
Hide Answer
Answer: Plants: Coal

6) Defect : Reunite
Exhort : Encourage
Formant : Rebellion
Expend : Replenish
Encroachment : Occupy
Hide Answer
Answer: Expend: Replenish

7) Find the missing word in the set Pooch : dog :: …?… : cat
Civet
Hound
Hyena
Hide Answer
Answer: civet

Which one is the most similar word in meaning to the given word?

8) After six months of coding practice, he has become much “Deft” with the technology.
Agile
Sluggish
Stagnant
inert
Hide Answer
Answer: Agile

Which one is the most opposite word in meaning to the given the word?

9) Pedantic
Imprecise
Abstruse
Obscure
Obnoxious
Hide Answer
Answer: Imprecise.

Select the option which expresses the meaning of the idioms and phrases

10) We should work on this section and “intensify” the changes as soon as Possible.
Boost
Deepen
Lessen
Quicken
Hide Answer
Answer: Lessen

11) Beating around the bush:
Avoiding the main topic
A person upset about something that happened previously.
Possible obstacles in your path
To hear rumours about something or someone
Hide Answer
Answer: Avoiding the main topic

Sentence:
The central government is beating around the bush when the citizens ask the reason for continuously increasing the price of petrol and diesel.

12) The ball is in your court:
To hear rumours about something or someone
Cannot judge something primarily on appearance.
It depends upon you to make the next decision or step.
To disclose a secret.
Hide Answer
Answer: It is up to you to make the next decision or step.

Sentence:
Ball is in your court now you have to decide what you should have to do.

13) Come hell or high water:
A huge amount of money given to a person when he/she leaves a company or retires
Something good and useful that has not
Possible obstacles in your path (will not stop you)
Being serious or dedicated
Hide Answer
Answer: Possible obstacles in your path (will not stop you)

Sentence:
I decided that come hell or high water I will become a Cricketer.

14) Chip on your shoulder:
When anyone is upset about anything that happened a while ago
Complaining about a loss from the past
To disclose a secret
When anyone receives the same treatment, usually negative, that he/she gives to others
Hide Answer
Answer: When anyone is upset about anything that happened a while ago

Sentence:
They have a chip on their shoulder that for being rejected in the dance competition.

15) Hear it on the grapevine:
Cannot judge something primarily on appearance.
To perform Action or for communications need more than one person.
To be in low spirits.
To hear rumours about something or someone.
Hide Answer
Answer: To hear rumours about something or someone.

Sentence:
I heard it on the grapevine that the price of the petrol had reached up to 100 rupees per litre.

16) To be in the doldrums:
To remain neutral
To be in low spirits
To initiate a social conversation or interaction
A process that helps to know if something is correct
Hide Answer
Answer: To be in low spirits

Sentence:
Ravi is in the doldrums after he is getting fail in the exam.

Wipro Aptitude Interview Questions
1) There is a family of six persons L, M, N, O, P, and Q. They are the Lawyer, Doctor, Teacher, Businessman, Actor, and Director. Two married couples are in the family. O, the businessman is married to the Lady Teacher. The Doctor is married to the Lawyer Q, and the Director is the son of M and brother of P. N, the Lawyer is the daughter-in-law of L. P is the unmarried Actor. L is the Grandmother of Q. Which is the profession of L?
Lawyer
Teacher
Doctor
Director
Hide Answer
Answer: b

2) The sum of a number and its two preceding numbers is equal to 36. Find the number:
10
11
9
8
Hide Answer
Answer: b

Explanation:
Let’s take a number: 10
Two preceding number of 10 will be 11 and 12
The sum of all three will be 33 which are not correct as per the given question.
Let’s take another number: 11
Two preceding number of 11 will be 12 and 13
The sum of all three will be 36.
Hence, 11 is the right option.

3) Sanjay invested an amount of Rs 12,960 for two years on compound interest and received an amount of RS 17,640 on maturity. What is the rate of interest per annum?
4%
5%
10%
Data Inadequate
Hide Answer
Answer: c

Explanation:
A=P (1+r/100)2
17640/12960= (1+r/100)2
441/324= (1+r/100)2
21/18)2= (1+r/100)2
r=10%

4) A reservoir is provided by two pipes X and Y. X can fill the reservoir 5 hours faster than Y. If both together fill the reservoir in 6 hours, the reservoir will be filled by Y alone in
10 hours
15 hours
8 hours
12 hours
Show Answer

5) The tank has six pipes fitted in them. Some of them are for inlet purpose and rest for outlet purpose. Each inlet pipe can fill the tank in 12 hours, and each outlet pipe can empty the tank in 8 hours. On opening all the pipes, an empty tank is filled in 12 hours. How many inlet pipes and outlet pipes are there?
4,2
2,3
5,2
4,4
Hide Answer
Answer: a

Explanation:
Suppose the number of inlet pipes is A, and the number of outlet pipes is B
A / 12 – B / 8 = 1/12
2B – 3B = 2
let’s take A = 4 and B = 2. Then the condition will be full-filled.
Thus, Inlet pipe: A = 4 and outlet pipe: B=2

6) A dealer buys dry fruits at the rate of 200, 160, and 120 per kg. He bought them in the ratio 24:30:40 by weight. He in total gets 20% profit by selling the first two, and at last, he finds that he has no loss or no gain in selling the whole quantity which he had. Calculate the percentage of loss that he suffered for the third quantity?
30%
40%
20%
50%
Hide Answer
Answer: b

Explanation:
Total Money spent by dealer:
(24 * 200 + 30 * 160 + 40 * 120) = 14400
For first 2 quantity, (24 * 200) + (30 * 160) = 9600
He gets 20% profit by selling first two items= 1920,
The total amount will be 9600+1920=11520
so the third quantity = 14400 – 11520 = 2880
Actual third quantity rate = 40 * 120 = 4800
Loss suffered = (4800 – 2880) / 4800
= 1920/4800 = 40 %

7) A boat takes 38 hours for traveling downstream from point X to point Y and coming back to a point Z midway between X and Y. If the stream velocity is 4km/h and the boat speed in still water is 14 km/h, find the distance between X and Y?
200 km
360 km
260 km
220 km
Hide Answer
Answer: b

Explanation:
Boat Speed for downstream = 14 + 4 = 18 km/hr
Boat speed for upstream = 14 – 4 = 10 km/hr
Distance = x
x / 18 + (x /2)/10 = 38
x = 360 km

8) The speed of a boat is 8 km/h in still water, and the speed of the current is 4 km/h. If the time taken to reach a certain distance upstream is 18 hours, the time it will take to go the same distance downstream is
3.5 hours
6.5 hours
6 hours
3 hours
Hide Answer
Answer: c

Explanation:
Upstream speed of a boat = 8 – 4 = 4 km/hr
downstream speed of a boat = 8 + 4 = 12 km/hr
suppose the distance = x
Then for Upstream case: x / 4 = 18. Hence, x = 72 km
Now the time taken to go the same distance downstream: Time = 72/12 = 6 hrs

9) A man can swim 10.5 km/h in still water, and he finds that it takes him twice as long to swim up as to swim down the river. The speed of the stream is
2.5 km/h
3.5 km/h
1.75 km/h
2 km/h
Hide Answer
Answer: b

Explanation:
Let the speed of stream be N. Then for downstream, 10.5 + N = D
and for upstream, 10.5 – N = U
so we get, D + U = 21
But, it takes him double as long to swim up as to swim down the river.
2U+ U = 21; U = 7. Thus, 10.5 – N = 7
S=3.5 km/h

10) Seats for Chemistry, Mathematics, and Computer science in a school are in the ratio 10:14:16. The management wants to increase these seats by 40%, 50%, and 75% respectively, find the ratio of increased seats?
2:3:4
5:7:6
8:9:7
None of these
Hide Answer
Answer: a

Explanation:
Let the number of seats for Chemistry, Mathematics, and Computer science: 10x, 14x, and 16x respectively.
According to the proposal, it will be
(14010x)/100, (15014x)/100, (175*16x)/100

It will be 14x, 21x, and 28x
The ratio will be 14:21:28 or 2:3:4.
Hence, A is the correct option.

Note: you need to practice this type of questions
Wipro Reasoning Interview Questions
Direction for the questions 1 to 5: These questions are based on the blood relation:

P is the mother of Q. Q is the sister of R. S is the son of R. T is the brother of S. U is the mother of T. V is the granddaughter of P. Q and R is the only two children of W.

1) How is W related to U?
Daughter-in-law
Father-in-law
Granddaughter
Cannot be determined
Hide Answer
Answer: b

2) How is T related to R?
Father
Son
Cousin brother
Cannot be determined
Hide Answer
Answer: b

3) Who is the mother of G?
G
B
F
Either B or F
Hide Answer
Answer: d

4) If RAIL is coded as ‘AILR,’ and ‘PARVEZ’ is coded as ‘AEPRVZ.’ In the same code language, ‘BLANK’ will be coded as
KNALB
AKNLB
AKLNB
AKBNL
Cannot be determined
Hide Answer
Answer: c

5) Complete the given series.
XP OI ? CA
DG
HD
GD
DH
Hide Answer
Answer: b

Direction for the questions 6 to 8: these questions are based on the given English words
NAM GET FAN CUB MID

6) If we interchange the position of the first and third letters of all the words, how many words will form meaningful English words?
Three
Two
One
None
Hide Answer
Answer: After interchanging the words we get: MAN TEG NAF BUC DIM
Hence, there is one meaningful word.

7) If all the letters of the words are arranged alphabetically (within the word), how many words will remain the same?

One
Three
Two
None
Hide Answer
Answer: Alphabetical order: AMN EGT AFN BCU DIM
Hence, D is the correct option.

8) If all the letters of the words are changed to the next letter of the English alphabetical series, how many vowels will appear in words? (Same or different vowel)
None
Three
Two
More than three
One
Hide Answer
Answer: d

The changed words are as follows: OBN HFU GBO DVC NJE. Out of all these five English words we have four vowels OUOE
Hence the right answer is D. More than three

9) Which pair is not following the series?
AZ GW MT SP YN
AZ
GW
MT
SP
YN
Hide Answer
Answer: d

10) Look at this series: 57, 57, 40, 40, 23, 23,… What will next?
12
14
06
18
Hide Answer
Answer: c

Note: You need to practice this type of questions.
Wipro Interview: Coding Round
Wipro gives two coding questions (based on automata and pattern) in the written round to check the coding skills. Out of the two, one program should compile successfully to go for next round of interview.

Note: The candidate who is familiar with the basic concepts can easily crack the logic of the program.
Let’s take an example:

1) Write a program to print the pattern:
123417181920 567 141516
891213 1011

Hide Answer
Answer:

include

include

int main(void) {
int a=0,b=0,i,j,Num=4,k,l;

for(i=Num; i >=1;i–)
{
for(j=Num; j>i; j–)
printf(” “);
for(k=1;k<=i; k++)
printf(“%d%s”,++a, “*”);

for(l=1;l<=i; l++)
{
printf(“%d”, ++b + i * i);
if(l!=i)
printf(“*”);
}
printf(“\n”);
}
return 0;
}
2) Write a program to remove all the vowels from a given string using switch case

include

include

include

int vowel(char);
int main()
{
char s[100], a[100];
int i, j = 0;
scanf(“%s” ,s);
for(i = 0; s[i] != ‘\0’; i++) {
if(vowel(s[i]) == 0) {
a[j] = s[i];
j++;
}
}
a[j] = ‘\0’;
printf(“%s\n”, a);
return 0;
}
int vowel(char ch)
{
switch(ch)
{
case ‘a’:
case ‘e’:
case ‘i’:
case ‘o’:
case ‘u’:
case ‘A’:
case ‘E’:
case ‘I’:
case ‘O’:
case ‘U’:
return 1;
default:
return 0;
}
}
Note: You need to practice the programs as more as possible.
Wipro Technical Interview Questions
1) What are the functionalities of an operating system?
These are some major functionalities of an operating system:

The operating system shares the Computer’s memory and sharing of the central processing unit time by various applications and peripheral devices.
An operating system provides a user interface, i.e., graphical user interface and command line.
An operating system includes functionality for booting the computer.
Perform some basic tasks, i.e., managing the peripheral devices.
It provides file management which refers to the way that operating system stores, retrieves, manipulates, and saves data.
2) What is the difference between UNIQUE key and PRIMARY key constraints?
Difference between unique key and primary key constraints:

Unique key
Primary key
A table can contain multiple unique keys.
A table can contain only one primary key.
NULL values are allowed.
NULL values are not allowed.
It helps to maintain a unique data in a column of a table.
It helps to identify a unique row from a table.
For MS SQL server databases, a unique constraint will generate a unique NON-CLUSTERED INDEX
Primary key will generate a unique CLUSTERED INDEX
3) How can you delete the duplicate row in a table?
In case of duplicate rows, you have to be more careful at the time of fetching records from the table.

To overcome this problem, we use a DISTINCT keyword.

It is used along with a SELECT statement to eliminate all duplicate records and fetching unique records.

Syntax:

The basic syntax to eliminate duplicate records from a table is:

SELECT DISTINCT column1, column2,….columnN
FROM table _name
WHERE [conditions]
EXAMPLE:

Let us take an example of the STUDENT table.

ROLL_NO
NAME
PERCENTAGE
ADDRESS
1
AJEET MAURYA
72.8
ALLAHABAD
2
CHANDAN SHARMA
63.5
MATHURA
3
DIVYA AGRAWAL
72.3
VARANASI
4
RAJAT KUMAR
72.3
DELHI
5
RAVI TYAGI
75.5
HAPUR
6
SONU JAISWAL
71.2
GHAZIABAD
Firstly we should check the SELECT query and see how it returns the duplicate percentage records.

SQL > SELECT PERCENTAGE FROM STUDENTS
ORDER BY PERCENTAGE;
PERCENTAGE
63.5
71.2
72.3
72.3
72.8
75.5
Now let us use a SELECT query with DISTINCT keyword and see the result. This will eliminate the duplicate entry.

SQL > SELECT DISTINCT PERCENTAGE FROM STUDENTS
ORDER BY PERCENTAGE;
PERCENTAGE
63.5
71.2
72.3
72.8
75.5

4) Define the SQL Profiler?
SQL Profiler can be defined as the profiler utility which is mainly used to track connections to the SQL Server and also determine the activities such as which SQL Scripts are running, and which one is getting failed, etc.

5) What is stored procedure? Explain with example.
Stored procedures are a batch of SQL statements that can be executed in a couple of ways. Most of the DBMS support stored procedures; however, not all do. The stored procedure increases the reusability as here the code or the procedure is stored into the system and used again and again that makes the work easy.

Syntax:

CREATE PROCEDURE procedure_name
AS
sql_statement
GO;
To execute a stored procedure

EXEC procedure_name;
Create a table and use this syntax for example.

6) What is a process and what is a thread?
A thread is a lightweight sub-process, the smallest unit of processing. It is a separate path of execution.

Threads are independent that means if there is an exception in one thread, it doesn’t affect other threads. It uses a shared memory area.

The process is heavyweight and can consists of multiple threads. It is a small part of a program.

7) What are the advantages of a thread? How does the multithreading look like?
These are the following advantages of a Thread:

It provides efficient communication.
It minimizes the context switching time.
By using thread, we can get the concurrency within a process.
Thread allows utilization of multiprocessor architectures to a greater scale and efficiency.
A process which executes multiple threads simultaneously is known as multithreading.
A thread is a lightweight sub-process, the smallest unit of processing.
To achieve multitasking in java, we have two ways:

Multiprocessing and multithreading

One process may contain more than one thread and execute simultaneously is known as multi-threading.

8) What are Multi-Processing and Multitasking?
Multitasking: As the name indicates multiple tasks run on a single CPU. We use multitasking to utilize the CPU.

Multitasking can be achieved in two ways:

Process-based Multitasking (Multiprocessing)
Thread-based Multitasking (Multithreading)
Multi-processing: Multi-processing refers to the ability of a system to support more than one central processing unit at the same time.

Multithreading: As the name indicates multiple threads run concurrently.

A thread is a lightweight sub-process, the smallest unit of processing.

9) What are stack and Queue and its applications?
Stack
The stack is an ordered list in which, insertion and deletion can be performed only at one end that is called a top.
The stack is a recursive data structure having a pointer to its top element.
Stacks are sometimes called as Last-In-First-Out (LIFO) lists, i.e., the element which is inserted first in the stack will be deleted last from the stack.
Applications of Stack:

Recursion
Expression evaluations and conversions
Parsing
Browsers
Editors
Tree Traversals
Queue
A queue can be defined as an ordered list which enables insert operations to be performed at one end called REAR and delete operations to be performed at another end called FRONT.
The queue is referred to be as the First-In-First-Out list.
For example, people waiting in line for a rail ticket form a queue.
Applications of Queue:

The queues are widely used as waiting lists for a single shared resource like a printer, disk, CPU.
The queues are used in the asynchronous transfer of data (where data is not being transferred at the same rate between two processes), e.g., Pipes, file IO, sockets.
The queues are used as buffers in most of the applications like MP3 media player, CD player, etc.
The queues are used to maintain the playlist in media players to add and remove the songs from the playlist.
The queues are used in operating systems for handling interrupts.
10) What is indexing, what are the advantages and disadvantages of it?
Indexes are special lookup tables. It is used to retrieve data from the database very fast.

An Index is used to speed up select queries and where clauses. But it shows down the data input with insert and update statements. Without affecting the data, we can create or drop indexes

An index in a database is just like an index in the back of a book.

Indexing can be of the following types

Primary index, secondary index, and clustering index.

The advantages of indexes are as follows:

An index makes it possible to retrieve data quickly.
Index’s use in queries usually results in much better performance.
They can be used for sorting. A post-fetch-sort operation can be eliminated.
Index guarantees uniquely identifiable records in the database.
The disadvantages of indexes are as follows:

Indexes decrease the performance on inserts, updates, and deletes.
Indexes take up space (this increase with the number of fields used and the length of the fields).
Databases will have monocase values in fields that are indexed.
11) What is De-Normalization where does it have?
Denormalization is the process of boosting up database performance and adding of redundant data which helps to get rid of complex data. Denormalization is a part of database optimization technique. This process is used to avoid the use of complex and costly joins.

Denormalization doesn’t refer to the thought of not to normalize instead of that denormalization takes place after normalization. In this process, firstly the redundancy of the data will be removed using normalization process than through denormalization process we will add redundant data as per the requirement so that we can easily avoid the costly joins.

12) What are the Different Objects in DBMS?
A database objects use to store or reference data in the database. Any statement which is written with CREATE Command is known as the database object.

Different types of object in DBMS are:

View: This object is used to create a view in the database. It is a logical table based on another view. A table on which view is based is called the base table.

Table: we can create a table in a database by using the CREATE TABLE statement.

Sequence: This object command used to create a sequence in the database. It is a user-created database object which is shared by multiple users to generate unique integers.

Index: A database object can create indexes in the database by using an index. Indexes are used for fast retrieval of rows from a table.

Synonym: This object is also used for creating indexes in the database. By synonym, you can easily access the objects

13) Give a SQL Query which uses Outer Join.
Syntax:Left outer join

SELECT table1.column1, table2.column2…
FROM table1
LEFT JOIN table2
ON table1.column_field = table2.column_field;
Let’s take two tables in this example to elaborate all the things:

CUSTOMER TABLE:

ID
NAME
AGE
SALARY
1
ARYAN
51
56000
2
AROHI
21
25000
3
VINEET
24
31000
4
AJEET
23
32000
5
RAVI
23
42000
This is the second table

ORDER TABLE:

O_ID
DATE
CUSTOMER_ID
AMOUNT
001
20-01-2012
2
3000
002
12-02-2012
2
2000
003
22-03-2012
3
4000
004
11-04-2012
4
5000
Join these two tables with LEFT JOIN:

SQL SELECT ID, NAME, AMOUNT, DATE
FROM CUSTOMER
LEFT JOIN ORDER
ON CUSTOMER.ID = ORDER.CUSTOMER_ID;
This will produce the following result:

ID
NAME
AMOUNT
DATE
1
ARYAN
NULL
NULL
2
AROHI
3000
20-01-2012
2
AROHI
2000
12-02-2012
3
VINEET
4000
22-03-2012
4
AJEET
5000
11-04-2012
5
RAVI
NULL
NULL

14) What are Self-Join and Outer Join, where do you use it?
Self-Join: A self-join is a join which joins the table with itself, means that each row of the table is combined with itself and with every other row of the table. The table contains a FOREIGN KEY which references its PRIMARY KEY.

It shows the one-to-many relationship in a table also known as a unary relationship.

Now come to SQL outer join, all the content of both tables is integrated together either they are matched or not.

An outer join is of two types:

  1. Left outer join (also known as left join): this join returns all the rows from left table combine with the matching rows of the right table. If you get no matching in the right table, it returns NULL values.

Syntax: Left outer join

SELECT table1.column1, table2.column2…..
FROM table1
LEFTJOIN table2
ON table1.column_field = table2.column_field;

  1. Right outer join (also known as right join): this join returns all the rows from right table are combined with the matching rows of left table .If you get no column matching in the left table .it returns null value.

Basic syntax for right joins:

SELECT table1.column1, table2.column2…..
FROM table1
RIGHT JOIN table2
ON table1.column_field = table2.column_field;

15) Explain some differences between TRUNCATE and DELETE commands with their syntax?
There is a slight difference b/w delete and truncate statement. The DELETE statement only removes the rows from the table based on the condition defined by WHERE clause or remove all the rows from the table when the condition is not specified.

But it does not free the space containing by the table.

Syntax:

DELETE FROM table_name [WHERE condition];
But if you do not specify the WHERE condition, it will remove all the rows from the table.

DELETE FROM table_name;
The TRUNCATE statement: It is used to delete all the rows from the table and free the containing space.

Syntax:

TRUNCATE TABLE employee;
16) Define memory management in C.
When you run a program, it loads into your computer memory and starts execution by sending and receiving the instructions from the computer’s processor. When your program needs to run a function, then it loads at another part of the memory till it runs and releases that memory when the task is complete.

Now, talk about the concept of dynamic memory allocation in c language, which enables the C programmer to allocate memory at runtime. Dynamic memory allocation in c language is possible by four functions of stdlib.h header file.

malloc()
calloc()
realloc()
free()
17) What are the steps involved in designing complete software?
To build software, a programmer should have to follow the SDLC.

Software development life cycle is a process of developing new software

There are six steps of SDLC:

Planning: Plan about the scope, approach, functionalities, etc.
Requirement analysis: Gather the required tools, data, and information that are required for the project
Designing: Design a prototype to check the architecture of the project.
Coding: coding as per designing.
Testing: testing is done to check whether the actual result meets the required result.
Maintenance: Updates
18) What is the difference between Abstract classes and interface?
Java interface should be implemented using the keyword “implements”; A Java abstract class should be extended using the keyword “extends.”

An Interface can extend interface only; Abstract class have two properties, it can extend only one java class but implement more than one interface at a time.

19) What is the property of a class?
We can define property in a way that property is a member of a class that provides the access of an object or a class to an attribute. For e.g., Properties include the length of a string, the size of a font, the caption of a window, the name of a customer, and so on.

20) Define precondition and postcondition to a member function.
A pre-condition is a condition that must be true before a method runs for it to work

A post-condition is a condition that must be truly guaranteed after a method is finished.

If all the preconditions of this method are satisfied, then postconditions will also meet for the same method.

No guarantee for behavior if the preconditions not meet.

21) How can you sort the elements of an array in ascending order?
C program to sort the element of an array in ascending order.

include

include
void main()
{

   int i, j, a, m, num[30];  
   printf("Enter the value of N \n");  
   scanf("%d", &m);  

   printf("Enter the numbers \n");  
   for (i = 0; i < m; ++i)  
       scanf("%d", &num[i]);  

   for (i = 0; i < m; ++i)   
   {  

       for (j = i + 1; j < m; ++j)  
       {  

           if (num[i] > num[j])   
           {  

               a =  num[i];  
               num[i] = num[j];  
               num[j] = a;  

           }  

       }  

   }  

   printf("Ascending order of elements \n");  
   for (i = 0; i < m; ++i)  
       printf("%d\n", num[i]);  

}
22) How can you sort the elements of an array in descending order?
C program to sort the element of an array in descending order.

include

include
void main ()
{

   int num[30];  

   int i, j, a, m;  
   printf("Enter the value of N\n");  
   scanf("%d", &m);  

   printf("Enter the numbers \n");  
   for (i = 0; i < m; ++i)  
    scanf("%d", &num[i]);  

   /*  sorting begins ... */  

   for (i = 0; i < m; ++i)   
   {  
       for (j = i + 1; j < m; ++j)   
       {  
           if (num[i] < num[j])   
           {  
               a = num[i];  
               num[i] = num[j];  
               num[j] = a;  
           }  
       }  
   }  

   printf("Descending order of the elements \n");  

   for (i = 0; i < m; ++i)   
   {  
       printf("%d\n", num[i]);  
   }  

}
23) How is macro execution faster than a function?
Macros can define before the main method or within the main method. Macros are pre-processed that means all the macros are processed before the compilation of the program, and the functions are processed after compilation of the program.

For example:

#include

include

define NUM 10 //Macro

int main()
{
printf(“%d”, NUM);
return 0;
}
Function example:

include

int num()
{
return 10;
}
int main()
{
printf(“%d”, num()); //calling
return 0;
}
24) Write a program to sort the string by using bubble sort.
Bubble sort: Bubble sort is a technique by which you can print the elements of an array in ascending or descending order. Bubble sort is used to sort string too.

Program to sort the string:

#include

include

void main()
{
int num, i, j;
char name[15][20], temp[20];
printf(“\n Sorts the strings of an array using bubble sort :\n”);
printf(“Number of strings :”);
scanf(“%d”, &num);
printf(“Input string %d :\n”, num);
for(i=0;i<=num; i++) { fgets(name[i], sizeof name, stdin); } for(i=1;i<=num;i++) for(j=0;j<=num-i;j++) if(strcmp(name[j],name[j+1])>0)
{
strcpy(temp,name[j]);
strcpy(name[j],name[j+1]);
strcpy(name[j+1],temp);
}
printf(“The strings appears after sorting :\n”);
for(i=0;i<=num;i++) printf(“%s\n”,name[i]); } 25) Write code in C to print “hello world” without using a semicolon #include

include

void main()
{
if(printf(“hello world”))
{
}
}
Output:

hello world
26) Write a program to find factorial of a number.

include

include

Void main()
{
int i, fact=1, num;
clrscr();
printf(“Enter the number for which you want to find factorial\n”);
scanf(“%d”, &num);
for(i=1;i<=num; i++)
{
fact=fact*i;
}
printf(“Factorial of %d is : %d”,num,f);
return 0;
}

27) Write a C program for Fibonacci series.

include

include

int main()
{
int n1=0,n2=1,n3,i,number;
printf(“Enter the number of elements:”);
scanf(“%d”,&number);
printf(“\n%d %d”,n1,n2); //printing 0 and 1
for(i=2;i<number;++i) //loop starts from 2 because 0 and 1 are already printed
{
n3=n1+n2;
printf(” %d”,n3);
n1=n2;
n2=n3;
}
return 0;
}


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *