Showing posts with label interview. Show all posts
Showing posts with label interview. Show all posts

Thursday 12 September 2013

HR Questions for TCS 2014 Batch

Following is the list of HR Questions asked during TCS 2013 Interview.

General Questions:
1. Tell me about yourself.
2. Why should I hire you?
3. What are your strengths and weaknesses?
4. Why do you want to work at our company?
5. What is the difference between confidence and over confidence?
6. What is the difference between hard work and smart work?
7. How do you feel about working nights and weekends?
8. Can you work under pressure?
9. Are you willing to relocate or travel?
10. What are your goals?
11. What motivates you to do good job?
12. What makes you angry?
13. Give me an example of your creativity.
14. How long would you expect to work for us if hired?
15. Are not you overqualified for this position?
16. Describe your ideal company, location and job.
17. What are your career options right now?
18. Explain how would be an asset to this organization?
19. What are your outside interests?
20. Would you lie for the company?
21. Who has inspired you in your life and why?
22. What was the toughest decision you ever had to make?
23. Have you considered starting your own business?
24. How do you define success and how do you measure up to your own definition?
25. If you won $10 million lottery, would you still work?
26. Tell me something about our company.
27. How much salary do you expect?
28. Where do you see yourself five years from now?
29. On a scale of one to ten, rate me as an interviewer.
30. Do you have any questions for me?
31. Why did you resign from your previous job?
32. Why have you been out of work so long?
33. Why have you had so many jobs?
34. Tell me about a situation when your work was criticized.
35. Could you have done better in your last job?
36. Tell me about the most boring job you have ever had.
37. May I contact your present employer for a reference?
38. How many hours a week do you normally work?
39. What was the toughest challenge you have ever faced?
40. Have you been absent from work more than a few days in any previous position?
41. What changes would you make if you came on board?
42. What would you say to your boss if he is crazy about an idea, but you think it stinks?
43. How could you have improved your career progress?
44. Tell me honestly about the strong points and weak points of your boss (company, management team, etc.)
45. Looking back on your last position, have you done your best work?
46. Why should I hire you from the outside when I could promote someone from within?
47. How do you feel about reporting to a younger person?
48. Looking back, what would you do differently in your life?
49. Why are not you earning more money at this stage of your career?

QUESTIONS ASKED DURING HR INTERVIEW

 
1. Tell about yourself
2. Tell about your family
3. Tell about your hobbies
4. What is your greatest achievement
5. What is your favorite colour, why
6. Why should I hire you
7. Why only TCS
8. How can your strengths be applicable for our company
9. Do you have any location consideration
10. Do you like Hyderabad? Then how can you leave Hyderabad and come to another place
11. Two reasons to reject you
12. Current affairs a) anna Hazare movement B) Do you support Telangana issue
13. Tell me about yourself
14. Long term and short term goals
15. Why TCS
16. Tell me about your two good qualities
17. Which is your worst situation
18. Degradation in percentage from inter to Btech Justify
19. Can you relocate
20. Do you know the terms and conditions of TCS
21. Tell me about yourself
22. Questions from your interest
23. What have you done so far in your B tech career
24. About Mini project
25. What is your favorite subject
26. Basic questions on your favorite subject
27. Do you have any knowledge on computer language
28. About your family and background
29. What do you want to do in the future
30. Some managerial questions by giving a situation
31. Why IT sector when your into ECE
32. Extracurricular interests
33. How did you achieve your merit certification
34. Have you given any presentation
35. What sports do you play
36. Questions on your favourite sport
37. Why TCS
38. Current affairs US downfall
39. What is your goal in life
40. Relocation
41. Why india is economically growing why not already developed
42. Tell me about yourself
43. Tell me about your family background.
44. How many girl friends you have
45. Tell me about yourself
46. Why TCS and not your core
47. Brief done those many projects in your core will you work with a company like TCS
48. What is ATL
49. Do you know TCS bond
50. Will you work with us for min of 5 years
51. Relocate
52. Tell me about yourself
53. Strengths give me examples
54. Why percentage decreased in B Tech
55. About your hobbies why only those
56. Are you well aware of current IT sector
57. Tell me about yourself
58. Next question is based on the answer I gave to the above question
59. Five tata related companies
60. Tag line of TCS
61. Capitals and states
62. About Sonia Gandhi family
63. Who is your favorite lecturer, why?
64. Describe your bus journey
65. Family background
66. Are you comfortable with relocation
67. Rules and regulations of TCS
68. What will you do if you get the job
69. Tell about your strengths
70. Hobbies
71. Prepare resume effectively
72. Introduce yourself tell about your family background
73. Tell about current affairs
74. Questions asked on hobbies strengths weakness.
75. Why you like BVRIT college. Why you want to join TCS
76. You are electronic student, you must join core company then why TCS
77. Where you are yourself after 5 years
78. Why should I hire you.
79. What you know about TCS
80. Where you rate yourself from 1 to 10
81. What are rules and regulations of TCS. bond of TCS
82. Did you participate in campus fight
83. Why do you like Hyderabad
84. Who is your role model
85. Are you flexible
86. Tell about yourself
87. Why was your aggregate low in the 1st year
88. Why did you choose ECE and trying software jobs.
89. What are you all about
90. State capitals
a. Maha rastra , Orissa, south Africa, srilanka
91. Tell me about your personality.
92. What are your personality
93. Do you have any relocation constraints
94. Terms and conditions of TCS
95. Being an electronic student why did you choose IT field
96. What is your plan immediately after 4th year
97. Tell me a quality in you such that the company cannot run without you
98. Tell me 3 reasons why should not I take you
99. Tell me about your family
100. Long term and short term goals
101. Why TCS
102. Tell me about your good qualities
103. Which is your worst situation
104. Degradation in percentage from inter to B tech Justify
105. Can you relocate
106. Do you know the terms and conditions of TCS
107. Why should I hire you
108. Where do you want to see yourself after 5 years
109. Extracurricular activities
a. Suggestion: Try to take everything in a positive way even though they impose negative questions on you and your behavior.
110. Where are you from
111. What is that place famous for
112. Discussion about native place. Get in with a clean and tension free mind. Only then you can do well.
113. Some questions about my hobbies(Be truthful and prepared while mentioning your hobbies or else you will be caught easily for sure)
114. Tell me one quality in you which would make me feel like without I cannot run TCS
115. Give me three reasons to reject you in this interview(for this be confident and tell sir I have cleared all my previous rounds and I think I performed well even in this round so I don’t find any reasons to get rejected sir )
116. You will be asked many stress questions in HR so be cool and confident. Only then you can crack the HR Round. In TR rather than questions from only the interested subject. Questions are asked from all important subjects.
117. TCS branches in Hyderabad
118. Do you know oriya
119. What is your eamcet rank
120. Being ECE student reasons for Opting IT
121. Following above question
122. Ready to relocate
123. Ready to sign the bond
124. Family background
125. Reasons for rejecting you
126. Questions based on the reasons specified
Suggestion: I conduct as many mock interviews as possible to prepare for interview rounds Special care for the improvements of spoken English. Care for development of communication skills.
127. Had your breakfast
128. Tell me about yourself
129. Family background
130. Why should I hire you
131. Imagine TCS as a person. justify the person as TCS
132. Who is your best friend
133. What are the qualities in you liked by your best friend
134. What is your aim or dream
135. Given me an example for fast learning
136. Any queries
137. Why do you prefer TCS
138. Session needed for core companies
139. Basic knowledge of EDC is must
140. Field of interest must choose
141. Sessions on microprocessors
142. Networks
143. Session on VHDL
144. Salary expected
145. How are you feeling today?
146. How is weather outside?
147. Strengths –need a spontaneous answer(prepared answers not accepted),give an example
148. Father of Akbar
149. Relationships among Gandhi family.
150. Recently watched movie->what did you learn from it.
151. Y.s jagan issue
152. Telangana issue- support 2reason, do not support -2 reasons
153. Qualities in a husband and asked to justify my answer
154. Where u from:
155. Say one moment in your life which has been very interesting for u till now.
156. Technical officer of TCS.
157. Why should I like you?
158. What is your ambition in u r life(not professional)
159. Actually what u want to become in life.
160. What are your hobbies
161. Did you learn any music course
162. What is your biggest achievement
163. Will u go anywhere in India
164. Do u know the terms and conditions of TCS
165. What r u r interests(other than social services)
166. Any questions for me
167. Why only TCS, Why no other company
168. My y experience in HR was ,firstly they called me for HR and the moment I opened the door and asked permission ,he just told me to hold there. After a couple of minutes he said me to enter. After entering the room he said me to sign on the application form .
169. He told me to take seat and made me stand and told him to move back for 2 times.
170. Then he made me to sit and asked me about my father and to talk about his profession.
171. He asked me the openition on JNTU correction .
172. What r the 3 drawbacks that an IT industry is facing now.
173. What are the 2 advantages &disadvantages for a student joining your college?
174. Describe u r personality
175. Eamet rank
176. Phonetics translation of a word
177. Are u interested in programming
178. Are u comfortable with IT
179. Are u ready to relocate
180. Do u know the T&C of TCS
181. Tell me about family background
182. Hobbies
183. In which way u r different from others
184. Any recent movies u had seen and asked to tell the story of the movie
185. What r u all about
186. State capitals
187. Maharast,Orissa,south Africa,srilanka
188. Do u want to ask any questions
189. Why was u r aggregate low in the 1st year
190. Why did u choose ece and trying for software jobs
191. Did u participate in campus fight
192. Why do u like Hyderabad
193. Who is u r role model
194. R u flexible
195. Tell about u r self
196. About u r home town
197. Why u choose ece
198. Why do u want to join in TCS
199. Which one is important either knowledge or study
200. Y u hobbies
201. Tell me about u r self
202. Short term goal
203. Ambition
204. What r u r weakness
205. Hobbies
206. Capitals
207. Present dollar value
208. Difference b/w reading for marks And reading for knowledge
209. 2.Do u read for marks or knowledge
210. 3 .Tell me about Anna hazare movement
211. 4.Who Is the governor of A.P
212. 5.Tell about kiran kumar reddy(c.m)
213. 6.capital city of manipal
214. 7.Where do see your self after 10 years
215. 8.Why india called sub-continent
216. About your self &what do u know about the company
217. About capital cities
218. Why shoud I hire u
219. About strengths and weakness
220. General knowledge questions
221. Tell me a film story
222. Making of biryani
223. Tell about u r self
224. Family background
225. How u r college different from others
226. Tell me about yourself
227. Narrate a story
228. What will u do if u become the principal of u r college
229. What will u do if u become the chief minister of ourstate
230. Do u support telangana and why
231. Family background
232. What r u r weaknesses
233. why do u want to bvrit
234. Tell about u r family background
235. 4 .Ready to relocate
236. What r the mojor It challenges faced today
237. What is u r father occupation
238. What makes u special
239. You are favorite cricketer
240. A movie u have watched
241. U after 2 years
242. Countries –capitals
243. Personality,area of interest, weakness
244. Puzzles,problem solving skillsexample
245. Geometrical constraints, rules of TCS about bond
246. How do u rate you self for problem solving, skills, attitude, c oding part
247. Analytical part coding part which is important. how do you rate them
248. If u face any problem, t hen how do u solve it after getting into our company
249. Tell me about the movie which u saw and explain at and the message from that movie
250. States and capitals
251. Tell me about u r self which is other than in the resume
252. Tell me about u r family background
253. Hobbies
254. Are u go any part of the country as a part of u r job
255. How u r adaptable to the surroundings
256. Gandhi family Grand mother of rahul Gandhi
257. About back ground
258. Without asking about c ,he himself declares that we don’t have any idea about c
259. What will u do in IT industry
260. Why do u prefer software
261. Tell me about yourself
262. Do u support Telangana
263. About lokpal bill
264. Capitals and states
265. Stories
266. What u have observed in this room after entering
267. 7 .Examples for u r strengths
268. General knowledge
269. Where u from
270. Where have you been to
271. How is delhi
272. Why delhi is our capital city,why not Mumbai,explain/support
273. Apart from IT professional work what r u interested in
274. How can u say that
275. Every body is saying the same that they participated in so and so,what is so special in u.
276. Who r the people u working with
277. Tell me about yourself
278. What is yours area area of interest
279. 3.Area of interest other than technical
280. 4.whether u have faced any challenges in this present academics
281. 5.They will ask about you recent or current curriculum activities or any cause if u have
282. 6.Tell me why you lost your grade is B.Tech
283. What is your favourite color,why
284. Why shoud I hire u
285. Why only TCS
286. How can u r strengths be applicable for our company
287. Do you have any location consideration
288. Do u like Hyderabad,Then how can u leave hyd and come to another place
289. Two reasons to reject you
290. Current affairs
291. Anna hazare movement,do u support telanga issue.
292. 1.who is u r best friend ,how did u meet her.Tell about her
293. 2.Describe one funniest movement in u r life
294. 3.Appart from professional ,what is u r aim in u r life
295. 4.What is u r greatestdesire
296. 5.Do u have any enemies if so do u hate her
297. 6.Are u aware of TCS trms and cond’s.
298. 7.after 10 years where will u be
299. 8.Will u relocate
300. 9.Which is u r favorite movie you have recently watched
301. 10.what message did u take from it
302. 11.What will u do when u r with u r friends
303. Where r u from
304. Which city u like more
305. Why that city
306. Who is u r inspiration
307. What do want to become in future
308. How will u cope when u r re-allocate at a remote place
309. Are u ok with relocation
310. R u aware of bond with TCS
311. CEO of company
312. Capitals of states
313. 1.family background
314. 2.greetings and body language are essential please note
a. Tell about yourself
315. Tell about your family
316. Tell about your hobbies
317. What is your greatest achievement
318. What is your favorite colour, why
319. Why should I hire you
320. Why only TCS
321. How can your strengths be applicable for our company
322. Do you have any location consideration
323. Do you like Hyderabad? Then how can you leave Hyderabad and come to another place
324. Two reasons to reject you
325. Current affairs a) anna Hazare movement B) Do you support Telangana issue
326. Tell me about yourself
327. Long term and short term goals
328. Why TCS
329. Tell me about your two good qualities
330. Which is your worst situation
331. Degradation in percentage from inter to Btech Justify
332. Can you relocate
333. Do you know the terms and conditions of TCS
334. Tell me about yourself
335. Questions from your interest
336. What have you done so far in your B tech career
337. About Mini project
338. What is your favorite subject
339. Basic questions on your favorite subject
340. Do you have any knowledge on computer language
341. About your family and background
342. What do you want to do in the future
343. Some managerial questions by giving a situation
344. Why IT sector when your into ECE
345. Extracurricular interests
346. How did you achieve your merit certification
347. Have you given any presentation
348. What sports do you play
349. Questions on your favorite sport
350. Why TCS
351. Current affairs US downfall
352. What is your goal in life
353. Relocation
354. Why india is economically growing why not already developed
355. Tell me about yourself
356. Tell me about your family background.
357. How many girl friends you have
358. Tell me about yourself
359. Why TCS and not your core
360. Brief done those many projects in your core will you work with a company like TCS
361. What is ATL
362. Do you know TCS bond
363. Will you work with us for min of 5 years
364. Relocate
365. Tell me about yourself
366. Strengths give me examples
367. Why percentage decreased in B Tech
368. About your hobbies why only those
369. Are you well aware of current IT sector
370. Tell me about yourself
371. Next question is based on the answer I gave to the above question
372. Five tata related companies
373. Tag line of TCS
374. Capitals and states
375. About Sonia Gandhi family
376. Who is your favorite lecturer, why?
377. Describe your bus journey
378. Family background
379. Are you comfortable with relocation
380. Rules and regulations of TCS
381. What will you do if you get the job
382. Tell about your strengths
383. Hobbies
384. Prepare resume effectively
385. Introduce yourself tell about your family background
386. Tell about current affairs
387. Questions asked on hobbies strengths weakness.
388. Why you like BVRIT college. Why you want to join TCS
389. You are electronic student, you must join core company then why TCS
390. Where you are yourself after 5 years
391. Why should I hire you.
392. What you know about TCS
393. Where you rate yourself from 1 to 10
394. What are rules and regulations of TCS. bond of TCS
395. Did you participate in campus fight
396. Why do you like Hyderabad
397. Who is your role model
398. Are you flexible
399. Tell about yourself
400. Why was your aggregate low in the 1st year
401. Why did you choose ECE and trying software jobs.
402. What are you all about
403. State capitals
404. Maha rastra , Orissa, south Africa, srilanka
405. Tell me about your personality.
406. What are your personality
407. Do you have any relocation constraints
408. Terms and conditions of TCS
409. Being an electronic student why did you choose IT field
410. What is your plan immediately after 4th year
411. Tell me a quality in you such that the company cannot run without you
412. Tell me 3 reasons why should not I take you
413. Tell me about your family
414. Long term and short term goals
415. Why TCS
416. Tell me about your good qualities
417. Which is your worst situation
418. Degradation in percentage from inter to B tech Justify
419. Can you relocate
420. Do you know the terms and conditions of TCS
421. Why should I hire you
422. Where do you want to see yourself after 5 years
423. Extracurricular activities
424. Suggestion: Try to take everything in a positive way even though they impose negative questions on you and your behavior.
425. Where are you from
426. What is that place famous for
427. Discussion about native place. Get in with a clean and tension free mind. Only then you can do well.
428. Some questions about my hobbies(Be truthful and prepared while mentioning your hobbies or else you will be caught easily for sure)
429. Tell me one quality in you which would make me feel like without I cannot run TCS
430. Give me three reasons to reject you in this interview(for this be confident and tell sir I have cleared all my previous rounds and I think I performed well even in this round so I don’t find any reasons to get rejected sir )
431. You will be asked many stress questions in HR so be cool and confident. Only then you can crack the HR Round. In TR rather than questions from only the interested subject. Questions are asked from all important subjects.
432. TCS branches in Hyderabad
433. Do you know oriya
434. What is your eamcet rank
435. Being ECE student reasons for Opting IT
436. Following above question
437. Ready to relocate
438. Ready to sign the bond
439. Family background
440. Reasons for rejecting you
441. Questions based on the reasons specified
442. Suggestion: I conduct as many mock interviews as possible to prepare for interview rounds Special care for the improvements of spoken English. Care for development of communication skills.
443. ad your breakfast
444. Tell me about yourself
445. Family background
446. Why should I hire you
447. Imagine TCS as a person. justify the person as TCS
448. Who is your best friend
449. What are the qualities in you liked by your best friend
450. What is your aim or dream
451. Given me an example for fast learning
452. Any queries
453. Why do you prefer TCS
454. Session needed for core companies
455. Basic knowledge of EDC is must
456. Field of interest must choose
457. Sessions on microprocessors
458. Networks
459. Session on VHDL
460. Salary expected
461. How are you feeling today?
462. How is weather outside?
463. Strengths –need a spontaneous answer(prepared answers not accepted),give an example
464. Father of Akbar
465. Relationships among Gandhi family.
466. Recently watched movie->what did you learn from it.
467. Y.s jagan issue
468. Telangana issue- support 2reason, do not support -2 reasons
469. Qualities in a husband and asked to justify my answer
470. Where u from
471. Say one moment in your life which has been very interesting for u till now.
472. Technical officer of TCS.
473. Why should I like you?
474. What is your ambition in u r life(not professional)
475. Actually what u want to become in life.
476. What are your hobbies
477. Did you learn any music course
478. What is your biggest achievement
479. Will u go anywhere in India
480. Do u know the terms and conditions of TCS
481. What r u r interests(other than social services)
482. Any questions for me
483. Why only TCS, Why no other company
484. My y experience in HR was ,firstly they called me for HR and the moment I opened the door and asked permission ,he just told me to hold there. After a couple of minutes he said me to enter. After entering the room he said me to sign on the application form .
485. He told me to take seat and made me stand and told him to move back for 2 times.
486. Then he made me to sit and asked me about my father and to talk about his profession.
487. He asked me the openition on JNTU correction .
488. What r the 3 drawbacks that an IT industry is facing now.
489. What are the 2 advantages &disadvantages for a student joining your college?
490. Describe u r personality
491. Eamet rank
492. Phonetics translation of a word
493. Are u interested in programming
494. Are u comfortable with IT
495. Are u ready to relocate
496. Do u know the T&C of TCS
497. Tell me about family background
498. Hobbies
499. In which way u r different from others
500. Any recent movies u had seen and asked to tell the story of the movie
501. What r u all about
502. State capitals
503. Maharast,Orissa,south Africa,srilanka
504. Do u want to ask any questions
505. Why was u r aggregate low in the 1st year
506. Why did u choose ece and trying for software jobs
507. Did u participate in campus fight
508. Why do u like Hyderabad
509. Who is u r role model
510. R u flexible
511. Tell about u r self
512. About u r home town
513. Why u choose ece
514. Why do u want to join in TCS
515. Which one is important either knowledge or study
516. Y u hobbies
517. Tell me about u r self
518. Short term goal
519. Ambition
520. What r u r weakness
521. Hobbies
522. Capitals
523. Present dollar value
a. 1Difference b/w reading for marks And reading for knowledge
b. 2.Do u read for marks or knowledge
c. 3 .Tell me about Anna hazare movement
d. 4.Who Is the governor of A.P
e. 5.Tell about kiran kumar reddy(c.m)
f. 6.capital city of manipal
g. 7.Where do see your self after 10 years
h. 8.Why india called sub-continent
524. About your self &what do u know about the company
525. About capital cities
526. Why shoud I hire u
527. About strengths and weakness
528. General knowledge questions
529. Tell me a film story
530. Making of biryani
531. Tell about u r self
532. Family background
533. How u r college different from others
534. Tell me about yourself
535. Narrate a story
536. What will u do if u become the principal of u r college
537. What will u do if u become the chief minister of ourstate
538. Do u support telangana and why
539. Family background
a. 1.What r u r weaknesses
b. 2.why do u want to bvrit
c. 3.Tell about u r family background
d. 4.Ready to relocate
e. 5.What r the mojor It challenges faced today
f. 6.What is u r father occupation
540. What makes u special
541. You are favorite cricketer
542. A movie u have watched
543. U after 2 years

544. Countries –capitals
a. 1.Personality,area of interest, weakness
b. 2.Puzzles,problem solving skillsexample
c. 3.Geometrical constraints, rules of TCS about bond
d. 4.How do u rate you self for problem solving, skills, attitude, c oding part
e. 5.Analytical part coding part which is important. how do you rate them
f. 6.If u face any problem, t hen how do u solve it after getting into our company

545. Tell me about the movie which u saw and explain at and the message from that movie
546. States and capitals
547. Tell me about u r self which is other than in the resume
548. Tell me about u r family background
549. Hobbies
550. Are u go any part of the country as a part of u r job
551. How u r adaptable to the surroundings

552. Gandhi family Grand mother of rahul Gandhi
1.About back ground
2.Without asking about c ,he himself declares that we don’t have any idea about c
3.What will u do in IT industry
4.Why do u prefer software
1.Tell me about yourself
2.Do u support Telangana
3.About lokpal bill
4.Capitals and states
5.Stories
6.What u have observed in this room after entering
7.Examples for u r strengths
8.General knowledge


553. Where u from
554. Where have you been to
555. How is delhi
556. Why delhi is our capital city,why not Mumbai,explain/support
557. Apart from IT professional work what r u interested in
558. How can u say that
559. Every body is saying the same that they participated in so and so,what is so special in u.
560. Who r the people u working with
561. Tell me about yourself
562. What is yours area area of interest
563. 3.Area of interest other than technical
564. 4.whether u have faced any challenges in this present academics
565. 5.They will ask about you recent or current curriculum activities or any cause if u have
566. 6.Tell me why you lost your grade is B.Tech
567. What is your favourite color,why
568. Why shoud I hire u
569. Why only TCS
570. How can u r strengths be applicable for our company
571. Do you have any location consideration
572. Do u like Hyderabad,Then how can u leave hyd and come to another place
573. Two reasons to reject you
574. Current affairs
575. Anna hazare movement,do u support telanga issue.
576. 1.who is u r best friend ,how did u meet her.Tell about her
577. 2.Describe one funniest movement in u r life
578. 3.Appart from professional ,what is u r aim in u r life
579. 4.What is u r greatestdesire
580. 5.Do u have any enemies if so do u hate her
581. 6.Are u aware of TCS trms and cond’s.
582. 7.after 10 years where will u be
583. 8.Will u relocate
584. 9.Which is u r favorite movie you have recently watched
585. 10.what message did u take from it
586. 11.What will u do when u r with u r friends
587. Where r u from
588. Which city u like more
589. Why that city
590. Who is u r inspiration
591. What do want to become in future
592. How will u cope when u r re-allocate at a remote place
593. Are u ok with relocation
594. R u aware of bond with TCS
595. CEO of company
596. Capitals of states
a. 1.family background
b. 2.greetings and body language are essential please note
597. TCS Placements HR questions
598. Tell about yourself
599. Tell about your family
600. Tell about your hobbies
601. What is your greatest achievement
602. What is your favorite colour, why
603. Why should I hire you
604. Why only TCS
605. How can your strengths be applicable for our company
606. Do you have any location consideration
607. Do you like Hyderabad? Then how can you leave Hyderabad and come to another place
608. Two reasons to reject you
609. Current affairs a) anna Hazare movement B) Do you support Telangana issue
610. Tell me about yourself
611. Long term and short term goals
612. Why TCS
613. Tell me about your two good qualities
614. Which is your worst situation
615. Degradation in percentage from inter to Btech Justify
616. Can you relocate
617. Do you know the terms and conditions of TCS
618. Tell me about yourself
619. Questions from your interest
620. What have you done so far in your B tech career
621. About Mini project
622. What is your favorite subject
623. Basic questions on your favorite subject
624. Do you have any knowledge on computer language
625. About your family and background
626. What do you want to do in the future
627. Some managerial questions by giving a situation
628. Why IT sector when your into ECE
629. Extracurricular interests
630. How did you achieve your merit certification
631. Have you given any presentation
632. What sports do you play
633. Questions on your favorite sport
634. Why TCS
635. Current affairs US downfall
636. What is your goal in life
637. Relocation
638. Why india is economically growing why not already developed
639. Tell me about yourself
640. Tell me about your family background.
641. How many girl friends you have
642. Tell me about yourself
643. Why TCS and not your core
644. Brief done those many projects in your core will you work with a company like TCS
645. What is ATL
646. Do you know TCS bond
647. Will you work with us for min of 5 years
648. Relocate
649. Tell me about yourself
650. Strengths give me examples
651. Why percentage decreased in B Tech
652. About your hobbies why only those
653. Are you well aware of current IT sector
654. Tell me about yourself
655. Next question is based on the answer I gave to the above question
656. Five tata related companies
657. Tag line of TCS
658. Capitals and states
659. About Sonia Gandhi family
660. Who is your favorite lecturer, why?
661. Describe your bus journey
662. Family background
663. Are you comfortable with relocation
664. Rules and regulations of TCS
665. What will you do if you get the job
666. Tell about your strengths
667. Hobbies
668. Prepare resume effectively
669. Introduce yourself tell about your family background
670. Tell about current affairs
671. Questions asked on hobbies strengths weakness.
672. Why you like BVRIT college. Why you want to join TCS
673. You are electronic student, you must join core company then why TCS
674. Where you are yourself after 5 years
675. Why should I hire you.
676. What you know about TCS
677. Where you rate yourself from 1 to 10
678. What are rules and regulations of TCS. bond of TCS
679. Did you participate in campus fight
680. Why do you like Hyderabad
681. Who is your role model
682. Are you flexible
683. Tell about yourself
684. Why was your aggregate low in the 1st year
685. Why did you choose ECE and trying software jobs.
686. What are you all about
687. State capitals
a. Maha rastra , Orissa, south Africa, srilanka
688. Tell me about your personality.
689. What are your personality
690. Do you have any relocation constraints
691. Terms and conditions of TCS
692. Being an electronic student why did you choose IT field
693. What is your plan immediately after 4th year
694. Tell me a quality in you such that the company cannot run without you
695. Tell me 3 reasons why should not I take you
696. Tell me about your family
697. Long term and short term goals
698. Why TCS
699. Tell me about your good qualities
700. Which is your worst situation
701. Degradation in percentage from inter to B tech Justify
702. Can you relocate
703. Do you know the terms and conditions of TCS
704. Why should I hire you
705. Where do you want to see yourself after 5 years
706. Extracurricular activities
a. Suggestion: Try to take everything in a positive way even though they impose negative questions on you and your behavior.
707. Where are you from
708. What is that place famous for
709. Discussion about native place. Get in with a clean and tension free mind. Only then you can do well.
710. Some questions about my hobbies(Be truthful and prepared while mentioning your hobbies or else you will be caught easily for sure)
711. Tell me one quality in you which would make me feel like without I cannot run TCS
712. Give me three reasons to reject you in this interview(for this be confident and tell sir I have cleared all my previous rounds and I think I performed well even in this round so I don’t find any reasons to get rejected sir )
713. You will be asked many stress questions in HR so be cool and confident. Only then you can crack the HR Round. In TR rather than questions from only the interested subject. Questions are asked from all important subjects.
714. TCS branches in Hyderabad
715. Do you know oriya
716. What is your eamcet rank
717. Being ECE student reasons for Opting IT
718. Following above question
719. Ready to relocate
720. Ready to sign the bond
721. Family background
722. Reasons for rejecting you
723. Questions based on the reasons specified
a. Suggestion: I conduct as many mock interviews as possible to prepare for interview rounds Special care for the improvements of spoken English. Care for development of communication skills.
724. Had your breakfast
725. Tell me about yourself
726. Family background
727. Why should I hire you
728. Imagine TCS as a person. justify the person as TCS
729. Who is your best friend
730. What are the qualities in you liked by your best friend
731. What is your aim or dream
732. Given me an example for fast learning
733. Any queries
734. Why do you prefer TCS
735. Session needed for core companies
736. Basic knowledge of EDC is must
737. Field of interest must choose
738. Sessions on microprocessors
739. Networks
740. Session on VHDL

Tuesday 10 September 2013

TCS Latest Interview Process – set 1( NIT Jalandhar) ,8th sept 2013

In this post we are sharing the complete interview process of NIT Jalandhar.

Company name :   TCS 2014
package offered : 3.18 lacs per anum
Bond details : 2 years

No of Students placed : 500+ students appeared for TCS and around 260 students cleared aptitude and around 100 students got selected.

Main Areas to focus : General aptitude and Any one language

First round details :
Test was about 90 minutes.80 minutes for analytical and 10 minutes for verbal.
First was the verbal section.You have to use the words and phrases given to write an email or letter or else given.Take care about the grammatical errors.Take 3-4 minutes to think and then write it fast.Minimum word limit is given.Follow the format of the thing you are given to write.
Analytical section comprised of 30 questions.Well the questions were difficult than previous years but some were too easy also.If you have prepared for apti then thats well but if dont then dont panic.Maximum Questions can be solved just by using your brain.

Main Topics to concentrate more for apti :
1. work and time,
2. Profit and loss
3. permutation and combinations.
4. Geometry

Some sample questions like :

1. In a given triangle ABC, AB=17.5, AC=9. D is a point on BC such that AD is perpendicular to BC. Find the radius of the circle circumstanding in the triangle ABC.
( I am not sure about the exact number but the approach is to use pythagoras theorem to find AD so that we can find the radius)

2. Find the next number in a given pattern ( series type question)
( Some AP sequence was given)

3.  Three unit circle inscribed in a circle. Find the area of the largest circle?
( some measurement was given and its easy to solve. Please spend some time to learn Geometry section)

4. Some questions based on men and work type
(wages calculation questions and its easy)

5. Find last two digits of ( a^b) + (c^d)
eg : (1021^3921)+ (3081^3921)


6. Sum of three digit number is 17. sum of squared of digits of the given num is 109. If we subtract 495 from that num we will get a number written in square order. find the num.

Books may be helpful to clear first round :
Arun Sharma CAT book  and RS agarwal book.
( If you dont have one better order it from this amazon link(coz its cheap)  you will get the book within 2 days or else google and download ebook but pls try to have these books)

Group Discussion : No

Interview experiences:
interview will be of 2 or 3 rounds depending upon the quantity of candidates.We had two rounds.
First was mixture of HR and Technical.Tell him the programming language which you are strong  in a diplomatic manner when asked.They will ask you questions from that part only. Don’t say what you cant answer.
I said java and c and they asked questions from that part only.HR questions were general.Like introduce yourself,Family,relocatable etc.
2nd round was just a time pass.They read my resume and asked my achievement in life.It can be personal or professional.Thats over with interviews

Books  I used for my preparation :
1. Let us C by yashwant kanetkar
2. Java Complete Reference

Advice to aspirants:

Don’t panic.
Prepare analytical,If don’t, then don’t panic.Just use your brain.
If  you are weak in programming ,just prepare a single language to some extent.
In an  interview remain cool minded.Talk frankly but in professional way.
Don’t lie that you cant justify.My advice is just speak the truth in a way that it impresses them.I spoke truth


Special thanks to Jasmeet,Amit and Imran from NIT Jalandhar for helping us to know the correct Interview process.

Monday 1 October 2012

General Tips To Overcome An Interview


So what if you are not a mountaineer. Or a keen hiker. You still cannot treat your interview like a careless morning trot along a jogger's path. Your jaw-jaw at the interview table is nothing less than a cautious climb up a mountain trail--which begins around your early childhood and meanders through the years at the academia before reaching a new summit in your career.And as you retrace your steps down memory lane make sure that you post flags at important landmarks of your life and career, so that you can pop them before the interview panel scoops them out of you. You don't want to be at the receiving end, do you?

Face the panel, but don't fall of the chair in a headlong rush-and-skid attempt to tell your story. Take one step at a time. If you place your foot on slippery ground, you could be ejecting out on a free fall.

So prepare, fortify your thoughts, re-jig your memory, and script and design your story (without frills and falsity). Without the right preparation and storyboard, you could be a loser at the interview. Here are a few preparation tips that books on interviews sometimes overlook.   

                                                        
Before the interview


1. Chronological Outline of Career and Education Divide your life into "segments" defining your university, first job, second job. For each stage, jot down :
The reason for opting certain course or profession; Your job responsibilities in your previous/current job; Reason of leaving your earlier/current job. You should be clear in your mind where you want to be in the short and long term and ask yourself the reason why you would be appropriate for the job you are being interviewed for and how it will give shape to your future course.


2. Strengths and Weaknesses
You should keep a regular check on your strengths and weaknesses. Write down three (3) technical and three (3) non-technical personal strengths. Most importantly, show examples of your skills. This proves more effective than simply talking about them. So if you're asked about a general skill, provide a specific example to help you fulfil the interviewer's expectations. It isn't enough to say you've got "excellent leadership skills". Instead, try saying:

"I think I have excellent leaderships skills which I have acquired through a combination of effective communication, delegation and personal interaction. This has helped my team achieve its goals."

As compared to strengths, the area of weaknesses is difficult to handle. Put across your weakness in such a way that it at leaset seems to be a positive virtue to the interviewer. Describe a weakness or area for development that you have worked on and have now overcome.

3. Questions you should be prepared for                                                                                  

Tell us about yourself.
What do you know about our company?
Why do you want to join our company?
What are your strengths and weaknesses?
Where do you see yourself in the next five years?
How have you improved the nature of your job in the past years of your working? Why should we hire you?
What contributions to profits have you made in your present or former company? Why are you looking for a change?

Answers to some difficult questions :                                     

  • Tell me about yourself ?
    Start from your education and give a brief coverage of previous experiences. Emphasize more on your recent experience explaining your job profile.

    What do you think of your boss?
    Put across a positive image, but don't exaggerate

    Why should we hire you? Or why are you interested in this job?
    Sum up your work experiences with your abilities and emphasise your strongest qualities and achievements. Let your interviewer know that you will prove to be an asset to the company.

    How much money do you want?
    Indicate your present salary and emphasise that the opportunity is the most important consideration.

     Do you prefer to work in a group?
    Be honest and give examples how you've worked by yourself and also with others. Prove your flexibility.
4. Questions to As                                                                                          
 At the end of the interview, most interviewers generally ask if you have any questions. Therefore, you should be prepared beforehand with 2-3 technical and 2-3 non-technical questions and commit them to your memory before the interview.

Do not ask queries related to your salary, vacation, bonuses, or other benefits. This information should be discussed at the time of getting your joining letter. Here we are giving few sample questions that you can ask at the time of your interview.

Sample Questions

Could you tell me the growth plans and goals for the company?
What skills are important to be successful in this position?
Why did you join this company? (optional)
What's the criteria your company uses for performance appraisal?
With whom will I be interacting most frequently and what are their responsibilities and the nature of our interaction?
What is the time frame for making a decision at this position?
What made the previous persons in this position successful/unsuccessful?

 5. Do your homework         
                                                                                                                    
 Before going for an interview, find out as much information on the company (go to Jobs Ahead Company Q and A) as possible. The best sources are the public library, the Internet (you can check out the company's site), and can even call the company and get the required information. The information gives you a one-up in the interview besides proving your content company or position.

Clearing the interview isn't necessarily a solitary attempt. Seek assistance from individuals who are in the profession and whose counsel you value most. Be confident in your approach and attitude; let the panel feel it through your demeanour, body language and dressing.

Getting prepared for your interview is the best way to dig deep and know yourself. You will be surprised that it would breed a new familiarity become more familiar with your own qualifications that will be make you present yourself better. All the best and get ready to give a treat.
  
Discretion abt written  Selection Process

Written Test:
Prepare from previous papers. It’s of the same pattern.Prepare wordlist from Barrons. There was no psychometric test.We had only 1 and a half hr to complete the paper. For quants, we had to write the answers and were not of multiple choices. Logical questions were bit tough.Main problem is the time shortage to complete it fully.

Interview
 There were around 8 - 10 panels for tech intrw held at TCS, Karapakkam, Chennai.Environment was excellent.
People from TCS were very soft and had a cheerful face.

In my panel, two persons of age around 35 – 40 yrs interviewed me.Tech intrw was held for around 55 min. Slightly drilling but easy.After clearing tech, I attended HR where one young man interviewed me.It went for half an hour exactly.Most of them were only personal questn and some tech Qs.On my time slot, 5 ppl attended in that same panel and only 2 cud get thro.

For another friend, the tech held for just 10min.They asked 2 gen. Qs like where he is from (Ambattur) and how he reached that office.Then 2 tech Qs 1) Shannons theory ? Ans: “I don’t know”2) Diff betn up85 & 86. He told correctly.He got selected.

So, it depends on ur luck to get a good panel.

Technical Interview
1.   Introduce ur self.

2.  First person started…..
He asked my mark sheets from which Qs were poured from various subj I’d studied in my BE (ECE) syllabus………

3.  Favorite subj.?
Digital

4. How abt mp?
Draw the architecture of 8085?Explain each block?Interrupts and its types? Flags?

5. Write a program to multiply 2 nos?Diff betn MOV & MVI?Diff betn 85 & 86And some more………?Latest mp used?

6.  Next person started…..Whats inside a CPU of PC? Inside processor? Whats a MODEM? working?
 If 2 PCs connected to a server using 2 MODEMs, what is the fn of each modem?

7.  Back from first person……meanwhile the 2nd person was going through my marksheets and certificates.

Lets move 2 ur fav subj…Digital -Draw the diag of OR and NOR? OR internal ckt diag ? 
I managed to draw a diag which is logically correct ( with 2 transistors …..)

Universal gates? Why? Draw OR using NOR gates? What is multiplexed?

8.Slowly deviated to analog-Describe abt transistor? Types? Types of BJT? Diag for NPN and PNP?
Differentiate where they r used?
Uses of transistor according to mode of opn.?
Uses of diode?
How it is used as rectifier?
Zener diode?
What is bias?
What is thyristor?
SCR? Where used?
Diff betn thyristor & transistor?
And some more………………

9. Then programming…… How good u r with programming? I know only C.
Asked me to write a pgm.
I’m not well versed with programming. I know only conceptually.
Why pointers? Answered
Luckly, they skipped the topic.

10. Then……Network Topologies? Bus, ring…
What u know in networking?
I know only the basics as this was not choosen as our elective.

Then whats ur elective?
Biomedical……..
(I think the person was good in that subj.)

11.I was caught …………He fired several questions like…
How ECG working?
Stethoscope working?
BP ? and more…………………
How pressure converted to signal?
Transducers? 

12. Then came to the project…Explain ur proj.
I explained clearly with proj report.
Some Qs on project.
I myself added that I did with 3 other students from different states and could manage to complete the project successfully.

13.Finally general Qs…You did a proj in digital design and why do u want to come to software?
Why not hardware?
What guarentee u give that u won’t shift to hardware after 2 yrs saying u don’t like S/w?
Another person asked what u studied in Engineering economics & mgmt?
R u interested in this subj?
I frankly said it’s a bit boring subj. ‘coz there is nothing to learn and this is the subj where we write stories.They smiled.
If we put u in proj dealing with mgmt,…..difft from what u’ve studied in BE, r u ready to do that?


U said it’s a boring subj. & now ready to switch over to that ?
First of all, working at TCS itself is a great pleasure and it would be my duty to develop interest in that subject and shine well in that area.
Finally they asked ‘any Qs 2 us’?
Yes sir!
On what electronics related proj r u working currently?
Then I smiled and said ‘then there is a chance for me to get into electronics based s/w projects’.

 HR Interview

1. Introduce urself other than in application.
I told abt my positives and ideologies.While I was saying the 2nd point of my ideology, my throat got chocked ‘coz of fear.
Are u alright? Yes sir. I’m slightly nervous.Its OK.

2. Whats ur hobbies?
Playing Tennis and chess.
In chess, how its scored?
I said we’ve checkmate the opponent king.
He poured more Qs on chess.
I said, I used to play chess only with computer just as a time pass and not serious with that.
How many squares r there in a chess board?
1st I said ‘100’ and then said ‘sorry 64’.

3. How abt tennis? How many sets are played in a match?How it is scored?
 said 0, 15, 30, 45, game.I made a damn mistake of saying 45 instead of 40.
He again asked to check and I was still stubborn with my ans.
What is game point? match pt? Deuce?
Who is ur fav. tennis player?Why?
But, Pete Sampras everytime defeats Agassi?
Whats ESPIRIT (Dept. assocn)?

4.What u’ve done?
Arranged VLSI conference.
Whats VLSI?
More than 1 million transistors per chip.
Explain sth abt VLSI.

5. No. of zeros in a million?6
No. of zeros in a lakh?
Got struck (due to tension) and started counting from units digit in mind.Then said 5. I frankly told him, ‘I need to count by fingers
He laughed..

6. Whats ur fav. subj? Digital
Describe OR & NOR gate in a sentence form
What is the IC no. for AND gate?
which co. produces such chips?

7.Where do u see urself after 3 yrs ?
Whats ur ambition?
Why TCS?(He really got stunned with my knowledge abt TCS)
What way u can provide a s/w that is useful to the community as well as TCS?
I gave some ideas like cognition tech for blind ppl and web-based applns,……
Why s/w?
Stressed the importance of software with egs.
What efforts u made to get into Software?
Any thing u did for the community welfare?
I gave a finishing touch. As of now, I cud help only physically. I think, if I’m being selected and once if I join TCS, I can help ppl even monitorily.

8.Finally, Any Qs to me?
Yes sir!
Whats the training period? 45 days
Whether I can avail transportation facilities from TCS? yes
Whether u do any electronics related proj @ Chennai? No. Its done at Hyd only.  

conclusion:
The test is followed by a Technical and a HR interview.The technical interview is highly specialised and covers almost all subjects you have done in your curriculum. However one is required to name his/her favorite subject on which most of the interview is focussed.For Computer Engineers C, Operating Systems, DBMS,Microprocessors are mostly focussed upon. Electronics Engineers can be grilled on DCLD, Microprocessors and Communications. For details on the frequently asked questions please refer to our Interview section.
The HR interview which follows the technical interview is very general.In most cases questions regarding the company are asked.For details on the other frequently asked questions please refer to our Interview section.

Saturday 8 September 2012

more updates on TCS 2013 new ques pattern

TCS UPDATE:
some few thngs wh i gathered from students who attended TCS on 5th sept...Let me make it clear dt earlier i hve said abt SUDOKU being asked...it's not Sudoku. It will be a 4x4 matrix(2x2 too). Some of them will be filled i.e fixed. You can use numbers from 0 to 9 so that the sum of rows and columns are equal or may also follow a logic...and it need not be numbers alone it can have fully of alphabets also....u can find such type of ques at http://www.vtaide.com/png/3x3-E.htm....and u can learn to to solve the 3*3,4*4 cell magic squares at...http://www.wikihow.com/Solve-a-Magic-Square

APTI: very tough s t answer from many... max questions attended was around 18 only among 30.. yu ll not hav time to solve all... it ll contain magic number box in 4-5....only 4-5 verbal quest... remaining fully puzzles only.. few students got around 5 quest from old pattern..sastra students saying they got analytical and logical questions too...no direct quest..still now cant able to figure out t exact pattern by both sastra nd tce'ians...so pls b little serious..Formulas wont have much role in this ...Its the presence of mind and how good ur logical reasoning is .
I would say questions were developed with a math base in a logical shell ,quite tricky too.For a total of 30 questions u will have 80 mins of time ..Stay cool,be wit basics of quants and think from a third angle ,fa sure you will crack it...our suggestion is to read 10 questi nd then answer as yu wont hav time to attend al nd also yu hav negative marks as wel..ll post few question soon..

INTERVIEW:mostly the things in resume will be asked ,The type of questions will depend on wat u speak... the HR people were too friendly,they try to ease u as much as possible ...dnt try to blush on HR ,stick to truth ... for ECE nd MECh, i think u guys ll hav interivew on EIS a core company of TCS i heard.. max every panel ll hav tech..upload correct resume in nextsteptcs website..dont make any mistakes as it makes some stress in todays interview..ask some seniors to review ur resume..t resume u carry shud b same as wat yu upload in t site.. ITs very impo..many quest were asked from tat..mech guys..concentrate on aerospace, manufact, EEE: concentrate on embedded systems..for CSE nd IT: surely yu might hav coding... bit longer interivew for yu probably.. SRM and other college guys start working wit this...nd others start preparing....

i hav a question paper given by FACE academy... from tat few questions were asked in t apti.. click on the link to download it...



good luck guys... any doubt, contact us...

Monday 27 August 2012

sample c program to practice before tech interview

 These are the collection of c programs that one must practice before going to technical interview......

1. Program to calculate the factorial of a number
2. Program to calculate the sum digits of a number
3. Program to reverse a number
4. Program to check the number is strong number or not.
5. Program to calculate the prime factors of a numbers
6. Program to check given number is Armstrong or not
7. Program to check given number is palindrome or not
8. Program to add between any two numbers using loop
9. Program to calculate daily expenditure if monthly expenditure is given using loop.
10. Program to count number of bits are set to 1 in an integer.
11. Program to calculate G.C.D of any two numbers
12. Program to calculate L.C.M of two numbers.
13. Program to calculate Fibonacci series
14. Program to calculate string palindrome
15. Program to check the number is Prime number or not
16. Program to find largest number in an array
17. Program to find Second largest number in an array
18. Program to remove duplicate elements in an array
19. Program to convert decimal to binary
20. Program to convert binary to decimal
21. Program to check the number is perfect number or not.
22. Program to find generic root of a number.
23. Program to check a year is leap year or not.
24. Program to reverse a string
25. Program to add a sub-string in a string
26. Program to traverse a string in reverse order
27. Program to count number of vowels , digits,characters and word present in string.
28. Program to add between two matrix
29. Program to multiplication between two matrix
30. Program to transpose a matrix
31. Program to check a matrix is sparse matrix or not
32. Program to calculate Amicable pairs from 1 to 1000
33. Program to calculate Sum of the series 1+2+3+---------+n
34. Program to find area triangle
35. Program for Bubble sort
36. Program for Selection sort
37. Program for insertion sort
38. Program for Quick Sort
39. Program for Merge Sort
40. Program for Sequential search using array
41. Program for Sequential search using linked list
42. Program for Binary search using array
43. Program for Binary search using linked list
44. Program to implement stack using linked list
45. Program to convert infix to prefix notation
46. Program to Evaluate postfix notation
47. Program to implement Queue using linked list
48. Program for Dqueue
49. Program for Priority Queue
50. Program to traverse linked list in reverse order.
51. Program to display the contents of a file using command line argument
52. Calculate the age of a person after giving the date of birth
53. Calculate the average marks of student looking at the following table
54. Calculate the amount to be paid after giving the total time.
55. Program to convert upper case to lower case
56. Program to calculate the power of a number
57. INSERT AN ELEMENT IN AN ARRAY AT DESIRED POSITION
58. program to calculate the sum of the following series
1 - x + x2/2! + x3/3! --------to nth term
59. find the weekday of a particular date(ex-6 sep 2010 (Monday)
60.Write a program to convert given ip address 192.168.3.35 into 192.168.003.035
61.Calculate the net salary looking at the following table
62. Write a program to display : 
*
***
*****
*******
*********
******
***
*
63. Write a program which will store roll name and age in student structure and address telephone no. In address structure. Implement the nested structure which will store information of ten students and their address and organize data in descending order by their roll no.
64. Write a program to store the information of student such as roll, name and course to a file using read & write system call.
65. Program for DFS
66. Program for BFS
67. Program to search an element using hash table
68. Program to search a string from hast table
69. Program to search an element using hash table using chaining
70. Shortest path using warshal's algorithm
71. Shortest path using Dijkstra's algorithm
72. Find the path matrix of Graph
73. Program to read the current date and time
74. Program to read all files from current directory

1. Program to calculate the factorial of a number

main()
{
int x,n;
printf("Enter a number :");
scanf("%d",&n);
x=fact(n);
printf("%d",x);
}
int fact(int n)
{
int f=1;
while(n>0)
{
f=f*n;
n--;
}
return f;
}

2. Program to calculate the sum digits of a number

main()
{
int x,n;
printf("Enter a number :");
scanf("%d",&n);
x=sum_digit(n);
printf("%d",x);
}
int sum_digit(int n)
{
int s=0;
while(n>0)
{
s=s + n%10;
n=n/10;
}
return s;
}

3. Program to reverse a number

main()
{
int x,n;
printf("Enter a number :");
scanf("%d",&n);
x=reverse(n);
printf("%d",x);
}
int reverse(int n)
{
int s=0;
while(n>0)
{
s=s *10 + n%10;
n=n/10;
}
return s;
}

4. Program to check the number is strong number or not.

main()
{
int x,n;
printf("Enter a number :");
scanf("%d",&n);
x=strong(n);
if(x==n)
printf("Strong");
else
printf("Not strong");
}
int strong(int n)
{
int s=0,r,f;
while(n>0)
{
r=n%10;
f=fact(r);
s=s+f;
n=n/10;
}
return s;
}
int fact(int n)
{
int f=1;
while(n>0)
{
f=f*n;
n--;
}
return f;
}
5. Program to calculate the prime factors of a numbers
main()
{
int x,n;
printf("Enter a number :");
scanf("%d",&n);
prime_factors(n);
}
int prime_factors(int n)
{
int i=1,k;
while(i<=n)
{
if(n%i==0)
{
k=check_prime(i);
if(k!=0)
printf("%d ",k);
}
i++;
}
}
int check_prime(int n)
{
int i=1;
int c=0;
while(i<=n)
{
if(n%i==0)
c++;
i++;
}
if(c==2)
return n;
else
return 0;
}

6. Program to check given number is Armstrong or not

main()
{
int n,x;
printf("Enter a number:");
scanf("%d",&n);
x=armstrong(n);
if(x==n)
printf("Arm strong");
else
printf("Not arm strong");
}
int armstrong(int num)
{
int sum=0,r;
while(num!=0)
{
r=num%10;
num=num/10;
sum=sum+(r*r*r);
}
return sum;
}

7. Program to check given number is palindrome or not

main()
{
int n,x;
printf("Enter a number:");
scanf("%d",&n);
x=palendrome(n);
if(x==n)
printf("Palendrome ");
else
printf("Not palendrome ");
}
int palendrome(int num)
{
int r=0;
while(num>0)
{
r=r* 10 + num%10;
num=num/10;
}
return r;
}

8. Program to add between any two numbers using loop

main()
{
int x;
int a,b;
printf("Enter any two numbers :");
scanf("%d%d",&a,&b);
x=add(a,b);
printf("%d ",x);
}
int add(int a,int b)
{
while(a>0)
{
b++;
a--;
}
return b;
}

9. Program to calculate daily expenditure if monthly expenditure is given using loop.

main()
{
int x,n;
printf("Enter monthely expenditure :");
scanf("%d",&n);
x=daily_exp(n);
printf("%d ",x);
}
int daily_exp(int n)
{
int c=0;
while(n>0)
{
c++;
n=n-30;
}
return c;

}

10. Program to count number of bits are set to 1 in an integer.

main()
{
int x,n;
printf("Enter a number :");
scanf("%d",&n);
x=bit_count(n);
printf("%d ",x);
}
int bit_count(int n)
{
int c=0;
while(n>0)
{
c++;
n=n&n-1;
}
return c;
}

11. Program to calculate G.C.D of any two numbers

main()
{
int n1,n2,x;
printf("Enter two numbers:");
scanf("%d%d",&n1,&n2);
x=gcd(n1,n2);
printf("%d ",x);
}
int gcd(int n1,int n2)
{
while(n1!=n2)
{
if(n1>n2)
n1=n1-n2;
else
n2=n2-n1;
}
return n1;
}

12. Program to calculate L.C.M of two numbers.

main()
{
int n1,n2,x;
printf("Enter two numbers:");
scanf("%d%d",&n1,&n2);
x=lcm(n1,n2);
printf("%d ",x);
}
int lcm(int n1,int n2)
{
int x,y;
x=n1,y=n2;
while(n1!=n2)
{
if(n1>n2)
n1=n1-n2;
else
n2=n2-n1;
}
return x*y/n1;
}

13. Program to calculate Fibonacci series

main()
{
int n;
printf("Enter the number range:");
scanf("%d",&n);
fibo(n);
}
int fibo(int n)
{
int i=0,j=1,k=2,r,f;
printf("%d %d ", i,j);
while(k<n)
{
f=i+j;
i=j;
j=f;
printf(" %d",j);
k++;
}
}

14. Program to calculate string palindrome

main()
{
char x[100],y[100];
printf("Enter a string :");
scanf("%s",x);
strcpy(y,x);
check_palindrome(x);
if(strcmp(x,y)==0)
printf("Palindrome");
else
printf("Not Palindrome");
}
int check_palindrome(char *x)
{
int len=strlen(x);
int i;
char temp;
for(i=0;i<len/2;i++)
{
temp=x[i];
x[i]=x[len-i-1];
x[len-i-1]=temp;
}
}

15. Program to check the number is Prime number or not

main()
{
int n,k;
printf("Enter a number:");
scanf("%d",&n);
k=check_prime(n);
if(k==2)
printf("Prime");
else
printf("Not prime");
}
int check_prime(int n)
{
int i=1,c=0;
while(i<=n)
{
if(n%i==0)
c++;
i++;
}
return c;
}

16. Program to find largest number in an array

main()
{
int a[]={15,67,25,90,40};
int k;
k=large_number(a);
printf("%d ",k);
}
int large_number(int a[5])
{
int i,big;
big=a[0];
for(i=1;i<5;i++)
{
if(big<a[i])
big=a[i];
}
return big;
}

17. Program to find Second largest number in an array

main()
{
int a[]={15,67,25,90,40};
int k;
k=large_number(a);
printf("%d ",k);
}
int large_number(int un[5])
{
int big1,big2;
int i;
big1 = un[0];
for ( i=1;i<5;++i )
if ( big1 < un[i] )
big1 = un[i];
if ( big1!=un[0] )
big2=un[0];
else
big2=un[1];
for(i=1; i<5;++i )
if (big1!=un[i] && big2 < un[i] )
big2=un[i];
return big2;
}

18. Program to remove duplicate elements in an array

main()
{
int i,k;
int x[10]={5,7,2,8,9,3,3,6,7,20};
k=remove_duplicate(x);
for(i=0;i<k;i++)
{
printf(" %d",x[i]);
}
}
int remove_duplicate(int p[10])
{
int size=10,i,j,k;
for(i=0;i<size;i++)
{
for(j=0;j<size;j++)
{
if(i==j)
{
continue;
}
else
if(*(p+i)==*(p+j))
{
k=j;
size--;
while(k < size)
{
*(p+k)=*(p+k+1);
k++;
}
j=0;
}
}
}
return size;
}

19. Program to convert from decimal to binary

main()
{
int n;
printf("Enter a number :");
scanf("%d",&n);
decimal_binary(n);
}
int decimal_binary(int n)
{
int m,no=0,a=1,rem;
m=n;
while(n!=0)
{
rem=n%2;
no=no+rem*a;
n=n/2;
a=a*10;
}
printf("%d",no);
}

20. Program to convert binary to decimal

main()
{
int n;
printf("Enter data in binary format :");
scanf("%d",&n);
binary_decimal(n);
}
int binary_decimal(int n)
{
int j=1,rem,n1=0;
while(n!=0)
{
rem=n%10;
n1=n1+rem*j;
j=j*2;
n=n/10;
}
printf("%d",n1);
}

21. Program to check the number is perfect number or not.

main()
{
int n,x;
printf("Enter a number:");
scanf("%d",&n);
x=check_perfect(n);
if(x==n)
printf("Perfect number :");
else
printf("Not a perfect number :");
}
int check_perfect(int n)
{
int s=0,i=1;
while(i<n)
{
if(n%i==0)
s=s+i;
i++;
}
return s;
}

22.Program to find generic root of a number.

main()
{
int n,k;
printf("Enter a number");
scanf("%d",&n);
k=generic(n);
printf("%d",k);
}
int generic(int n)
{
int sum,r;
if(n<10)
return n;
while(n>10)
{
sum=0;
while(n!=0)
{
r=n%10;
n=n/10;
sum+=r;
}
if(sum>10)
n=sum;
else
break;
}
return sum;
}

23. Program to check a year is leap year or not.

main()
{
int year;
printf("Enter the year :\n");
scanf("%d",&year);
if((year % 400==0 )|| ((year % 4==0)&& (year %100!=0)))
printf("Leap Year ");
else
printf("Not leap year");
}

24. Program to reverse a string

main()
{
char x[100];
printf("Enter a string :");
gets(x);
strrev(x);
printf("%s",x);
}
int strrev(char *x)
{
int len=strlen(x);
int i;
char temp;
for(i=0;i<len/2;i++)
{
temp=x[i];
x[i]=x[len-i-1];
x[len-i-1]=temp;
}
}

25. Program to add a sub-string in a string

main()
{
char x[100],y[20];
int pos;
printf("Enter string :");
gets(x);
printf("Enter substring:");
scanf("%s",y);
printf("Enter position:");
scanf("%d",&pos);
add_substring(x,y,pos);
}
int add_substring(char *x,char *y,int pos)
{
char z[100];
int i=0,j=0,k;
memset(z,0,sizeof(z));
while(i<pos)
{
z[i]=*x;
x++;
i++;
}
while(*y!=0)
{
z[i]=*y;
i++;
y++;
}
z[i]=' ';
i++;
while(*x!=0)
{
z[i]=*x;
i++;
x++;
}
z[i]=0;
printf("%s",z);
}

26. Program to traverse a string in reverse order

main()
{
char x[100];
printf("Enter a string :");
gets(x);
int len=strlen(x)-1;
while(len>=0)
{
printf("%c",x[len]);
len--;
}
}

27. Program to count number of words,vowels,digits and space present in string.

main()
{
int word=0,space=0,digit=0,vowels=0,i;
char x[100];
printf("Enter a string :");
gets(x);
for(i=0;i<strlen(x);i++)
{
if(x[i]=='a' || x[i]=='A' || x[i]=='e' || x[i]=='E' || x[i]=='i' || x[i]=='I'
|| x[i]=='o' || x[i]=='O' || x[i]=='u' || x[i]=='U')
vowels++;
if(x[i]>=48 && x[i]<=57)
digit++;
if(x[i]==32) //space
space++;
}
word=space+1;
printf("%d %d %d %d\n",word,space,digit,vowels);
}

28. Program to add between two matrix

main()
{
int a[3][3]={
1,2,1,
1,2,2,
3,2,1
};
int b[3][3]={
2,2,1,
1,1,1,
2,3,1
};
int c[3][3];
int i,j,k,sum=0;
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
c[i][j]=a[i][j]*b[i][j];
}
}
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
printf("%d ",c[i][j]);
}
printf("\n");
}
}

29. Program for multiplication between two matrix

main()
{
int a[3][3]={
1,2,1,
1,2,2,
3,2,1
};
int b[3][3]={
2,2,1,
1,1,1,
2,3,1
};
int c[3][3];
int i,j,k,sum=0;
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
c[i][j]=0;
for(k=0;k<3;k++)
{
c[i][j]=c[i][j]+a[i][k]*b[k][j];
}
}
}
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
printf("%d ",c[i][j]);
}
printf("\n");
}
}

30. Program to transpose a matrix

main()
{
int a[3][5]={
1,4,5,6,7,
2,3,4,1,5,
9,5,3,1,4
};
int b[5][3];
int i,j;
for(i=0;i<3;i++)
{
for(j=0;j<5;j++)
{
b[j][i]=a[i][j];
}
}
for(i=0;i<5;i++)
{
for(j=0;j<3;j++)
{
printf("%d",b[i][j]);
}
printf("\n");
}
}

31. Program to check a matrix is sparse matrix or not

main()
{
int mat[3][5]={
1,0,2,3,0,
0,1,0,1,0,
0,0,0,1,0
};
int i,j,nzero=0,zero=0;
for(i=0;i<3;i++)
{
for(j=0;j<5;j++)
{
if(mat[i][j]!=0)
nzero++;
else
zero++;
}
}
if(zero>nzero)
printf("The matrix is sparse matrix");
else
printf("Not a sparse matrix");
}

32. Program to calculate Amicable pairs from 1 to 1000

#include "stdio.h"
main()
{
int n,k;
int i=1,s1=0,s2=0;
for(k=1;k<=1000;k++)
{
n=k;
while(i<n)
{
if(n%i==0)
s1=s1+i;
i++;
}
i=1;
if(s1==n)
continue;
while(i<s1)
{
if(s1%i==0)
s2=s2+i;
i++;
}
if(n==s2)
printf("%d \n",n);
s1=0;
s2=0;
}
}

33. Program to calculate Sum of the series 1+2+3+---------+n

main()
{
int r;
printf("Enter the number range: ");
scanf("%d",&r);
printf("%d",(r*(r+1))/2);
}

34. Program to find area triangle

#include "math.h"
int main()
{
double a,b,c,s;
double area;
printf("Enter the size of triangle :");
scanf("%lf%lf%lf",&a,&b,&c);
s = (a + b + c)/2;
area =sqrt (s*(s-a)*(s-b)*(s-c));
printf("%lf",area);
}

35. Program for Bubble sort

main()
{
int a[5]={4,9,40,2,25};
int i;
bubble_sort(a);
for(i=0;i<5;i++)
printf("%d ",a[i]);
}
int bubble_sort(int a[5])
{
int i,j,temp;
for(i=0;i<5;i++)
{
for(j=0;j<5-i;j++)
{
if(a[j]>a[j+1])
{
temp=a[j];
a[j]=a[j+1];
a[j+1]=temp;
}
}
}
}

36. Program for Selection sort

main()
{
int a[5]={4,9,40,2,25};
int i;
selection_sort(a);
for(i=0;i<5;i++)
printf("%d ",a[i]);
}
int selection_sort(int a[5])
{
int i,j,temp;
for(i=0;i<5;i++)
{
for(j=i+1;j<5;j++)
{
if(a[i]>a[j])
{
temp=a[i];
a[i]=a[j];
a[j]=temp;
}
}
}
}

37. Program for Insertion sort

main()
{
int a[5]={4,9,40,2,25};
int i;
insert_sort(a);
for(i=0;i<5;i++)
printf("%d ",a[i]);
}
int insert_sort(int a[5])
{
int i,j,k,temp;
for(i=1;i<5;i++)
{
for(j=0;j<i;j++)
{
if(a[i]<a[j])
{
temp=a[i];
for(k=i;k>j;k--)
{
a[k]=a[k-1];
}
a[j]=temp;
}
}
}
}

38. Program for quick sort

main()
{
int x[5]={5,9,2,20,6};
int i;
quick_sort(x,0,4);
for(i=0;i<5;i++)
printf("%d ",x[i]);
}
quick_sort(int x[10],int first,int last)
{
int pivot,j,temp,i;
if(first<last)
{
pivot=first;
i=first;
j=last;
while(i<j)
{
while(x[i]<=x[pivot]&&i<last)
i++;
while(x[j]>x[pivot])
j--;
if(i<j)
{
temp=x[i];
x[i]=x[j];
x[j]=temp;
}
}
temp=x[pivot];
x[pivot]=x[j];
x[j]=temp;
quick_sort(x,first,j-1);
quick_sort(x,j+1,last);
}
}

39. Program for Merge Sort

40. Program for sequential search

main()
{
int a[]={6,5,3,20,55};
int i,flag=0,n;
printf("Enter number to search :");
scanf("%d",&n);
for(i=0;i<5;i++)
{
if(a[i]==n)
{
flag=1;
break;
}
}
if(flag==1)
printf("Found\n");
else
printf("Not found\n");
}

41. Program for Sequential search using linked list

struct xxx
{
int data;
struct xxx *ad;
};
struct xxx *create_linkedlist();
main()
{
int k;
struct xxx *b;
b=create_linkedlist();
k=search(b);
if(k==1)
printf("Found ");
else
printf("Not found\n");
}
struct xxx *create_linkedlist()
{
char ch[10];
struct xxx *p,*q,*r;
p=malloc(sizeof(struct xxx));
printf("Enter data :");
scanf("%d",&p->data);
r=p;
while(1)
{
printf("Do u continue yes/no :");
scanf("%s",ch);
if(strcmp(ch,"no")==0)
break;
q=malloc(sizeof(struct xxx));
p->ad=q;
p=q;
printf("Enter data :");
scanf("%d",&p->data);
}
p->ad=0;
return r;
}
int search(struct xxx *p)
{
int n,flag=0;
printf("Enter number to search :");
scanf("%d",&n);
while(p!=0)
{
if(p->data==n)
{
flag=1;
break;
}
p=p->ad;
}
return flag;
}


42. Binary Search using an Array

void main()
{
int a[10],i,n,m,c=0,l,u,mid;
printf("Enter the size of an array->");
scanf("%d",&n);
printf("\nEnter the elements of the array->");
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
printf("\nThe elements of an array are->");
for(i=0;i<n;i++)
{
printf(" %d",a[i]);
}
printf("\nEnter the number to be search->");
scanf("%d",&m);
l=0,u=n-1;
while(l<=u)
{
mid=(l+u)/2;
if(m==a[mid])
{
c=1;
break;
}
else
if(m<a[mid])
{
u=mid-1;
}
else
l=mid+1;
}
if(c==0)
printf("\nThe number is not in the list");
else
printf("\nThe number is found");
}

43. Program for Binary search using linked list

struct xxx
{
int roll;
struct xxx *ad;
};
struct xxx *create();
main()
{
int status;
int u,n;
struct xxx *b;
b=create();
visit(b);
selection_sort(b);
printf("\n");
visit(b);
u=count(b);
printf("Enter number to search :");
scanf("%d",&n);
status=binary_search(b,1,u,n);
if(status==1)
printf("Found\n");
else
printf("Not found\n");
}
int binary_search(struct xxx *p,int l,int u,int n)
{
struct xxx *r=p;
int mid,i,f=0;
while(l<=u && r!=0)
{
mid=(l+u)/2;
for(i=1;i<mid;i++)
{
r=r->ad;
}
if(n==r->roll)
{
f=1;
break;
}
if(n<r->roll)
{ u=mid-1;
}
if(n>r->roll)
{
l=mid+1;
}
r=p;
}
return f;
}
int count(struct xxx *p)
{
int c=0;
while(p!=0)
{
c++;
p=p->ad;
}
return c;
}
int selection_sort(struct xxx *p)
{
struct xxx *q=p->ad;
int temp;
while(p->ad!=0)
{
while(q!=0)
{
if(p->roll>q->roll)
{
temp=p->roll;
p->roll=q->roll;
q->roll=temp;
}
q=q->ad;
}
p=p->ad;
q=p->ad;
}
}
int visit(struct xxx *p)
{
while(p!=0)
{
printf("%d ",p->roll);
p=p->ad;
}
}
struct xxx *create()
{
struct xxx *p,*q,*r;
char ch[10];
p=malloc(sizeof(struct xxx));
r=p;
while(1)
{
printf("Enter roll :");
scanf("%d",&p->roll);
printf("Do u continue yes/No:");
scanf("%s",ch);
if(strcmp(ch,"no")==0)
break;
q=malloc(sizeof(struct xxx));
p->ad=q;
p=q;
}
p->ad=0;
return r;
}

44. Program to implement stack using linked list

struct xxx
{
int roll;
struct xxx *ad;
};
struct xxx *p=0;
main()
{
int x;
do
{
printf("1 for push\n");
printf("2 for pop\n");
printf("0 for stop\n");
printf("Enter choice :");
scanf("%d",&x);
if(x==1)
{
push();
}
else
if(x==2)
{
pop();
}
}while(x!=0);
}
int pop()
{
if(p==0)
{
printf("Stack is empty\n");
return;
}
else
{
printf("%d \n",p->roll);
p=p->ad;
}
}
int push()
{
struct xxx *q;
if(p==0)
{
p=malloc(sizeof(struct xxx));
printf("Enter roll :");
scanf("%d",&p->roll);
p->ad=0;
}
else
{
q=malloc(sizeof(struct xxx));
q->ad=p;
p=q;
printf("Enter roll :");
scanf("%d",&p->roll);
}
}

45. Program to convert infix to prefix notation

struct xxx
{
char data;
struct xxx *ad;
};
main()
{
int len;
struct xxx *opd=0,*opr=0,*q;
char x[50];
char y[50];
int i=0;
printf("Enter Infix expression :");
scanf("%s",x);
char *p=x+strlen(x)-1;
int k1,k2;
for(i=strlen(x)-1;i>=0;i--)
{
if(*p>=48 && *p<=57)
{
if(opd==0)
{
opd=malloc(sizeof(struct xxx));
opd->data=*p;
opd->ad=0;
}
else
{
q=malloc(sizeof(struct xxx));
q->ad=opd;
opd=q;
opd->data=*p;
}
}
else
{
if(opr==0)
{
opr=malloc(sizeof(struct xxx));
opr->data=*p;
opr->ad=0;
}
else
{
k1=check_precedence(*p);
k2=check_precedence(opr->data);
if(k1<=k2)
{
while(k1<=k2 && opr!=0)
{
q=malloc(sizeof(struct xxx));
q->ad=opd;
opd=q;
opd->data=opr->data;
opr=opr->ad;
if(opr==0)
{ opr=malloc(sizeof(struct xxx));
opr->ad=0;
break;
}
k2=check_precedence(opr->data);
}
opr->data=*p;
}
else
{
q=malloc(sizeof(struct xxx));
q->ad=opr;
opr=q;
opr->data=*p;
}
}//else
} //else
p--;
} //for
while(opr!=0)
{
q=malloc(sizeof(struct xxx));
q->ad=opd;
opd=q;
opd->data=opr->data;
opr=opr->ad;
}
memset(y,0,sizeof(y));
i=0;
while(opd!=0)
{
y[i]=opd->data;
i++;
opd=opd->ad;
}
printf("%s ",y);
}
int check_precedence(int m)
{
switch(m)
{
case '+':
case '-':
return 1;
case '/':
case '*':
return 2;
}
}

46. Program to Evaluate postfix notation

struct xxx
{
unsigned char data;
struct xxx *ad;
};
main()
{
unsigned char a,b,c;
struct xxx *st=0,*q;
char x[100];
printf("Enter Post Expression:");
scanf("%s",x);
char *p=x;
while(*p!=0)
{
if(*p>=48 && *p<=57)
{
if(st==0)
{
st=malloc(sizeof(struct xxx));
st->data=*p;
st->ad=0;
}
else
{
q=malloc(sizeof(struct xxx));
q->ad=st;
st=q;
st->data=*p;
}
}
else
{
b=st->data-48;
st=st->ad;
a=st->data-48;
if(*p=='*')
{
c=a*b;
}
else
if(*p=='/')
{
c=a/b;
}
else
if(*p=='+')
{
c=a+b;
}
else
if(*p=='-')
{
c=a-b;
}
st->data=c+48;
}
p++;
}
printf("%d ", st->data-48);
}

47. Program to implement Queue using linked list

#include<stdio.h>
#include<malloc.h>
struct node
{
int info;
struct node *next;
} ;
struct node *front, *rear;
void enqueue(int elt);
int dequeue();
void display();
void main()
{
int ch, elt;
rear = NULL;
front = NULL;
while (1)
{
printf("1 Insert\n");
printf("2 Delete\n");
printf("3 Display\n");
printf("4 Exit\n");
printf("Enter your choice : ");
scanf("%d", &ch);
switch (ch)
{
case 1:
printf("Enter The Element Value\n");
scanf("%d", &elt);
enqueue(elt);
break;
case 2:
elt = dequeue();
printf("The deleted element = %d\n", elt);
break;
case 3:
display();
break;
default:
exit(0);
}
}
}
void enqueue(int elt)
{
struct node *p;
p = (struct node*)malloc(sizeof(struct node));
p->info = elt;
p->next = NULL;
if (rear == NULL || front == NULL)
front = p;
else
rear->next = p;
rear = p;
}
int dequeue()
{
struct node *p;
int elt;
if (front == NULL || rear == NULL)
{
printf("\nUnder Flow");
exit(0);
}
else
{
p = front;
elt = p->info;
front = front->next;
free(p);
}
return (elt);
}
void display()
{
struct node *t;
t = front;
while (front == NULL || rear == NULL)
{
printf("\nQueue is empty");
exit(0);
}
while (t != NULL)
{
printf("->%d", t->info);
t = t->next;
}
}
49. Program for Priority Queue
struct xxx
{
int pr;
struct xxx *ad;
};
struct xxx *p=0;
main()
{
int x;
do
{
printf("1 for add\n");
printf("2 for dele\n");
printf("3 for traverse\n");
printf("0 for stop\n");
printf("Enter choice :");
scanf("%d",&x);
if(x==1)
add();
else
if(x==2)
dele();
else
if(x==3)
trav();
}while(x!=0);
}
int trav()
{
struct xxx *r=p;
while(r!=0)
{
printf("%d ",r->pr);
r=r->ad;
}
}
int add()
{
struct xxx *q,*r,*m;
if(p==0)
{
p=malloc(sizeof(struct xxx));
printf("Enter priority :");
scanf("%d",&p->pr);
p->ad=0;
}
else
{
q=malloc(sizeof(struct xxx));
printf("Enter priority :");
scanf("%d",&q->pr);
if(q->pr <= p->pr)
{
q->ad=p;
p=q;
}
else
{
r=p;
while(q->pr > r->pr)
{
m=r;
if(r->ad==0)
{
r->ad=q;
q->ad=0;
return;
}
r=r->ad;
}
m->ad=q;
q->ad=r;
}
}
}
int dele()
{
struct xxx *r,*m;
r=p;
if(r==0)
{
printf("Stack is empty\n");
exit(0);
}
while(r->ad!=0)
{
m=r;
r=r->ad;
}
free(r);
m->ad=0;
}

50. Traverse a linked list in reverse order

#include <stdio.h>
#define NODES 4
typedef struct list_head {
struct node* head;
struct node* tail;
} list_head;
typedef struct node {
struct node* next;
int value;
} node;
node n[NODES];
list_head init_empty_list()
{
list_head h;
h.head = 0;
h.tail = 0;
return h;
}
list_head init_list()
{
int i;
list_head h;
for (i=0; i<NODES-1; ++i) {
n[i].next = &n[i+1];
n[i].value = i+1;
}
n[NODES-1].next = 0;
n[NODES-1].value = NODES;
h.head = &n[0];
h.tail = &n[NODES-1];
return h;
}
void print_list(list_head h)
{
node* p = h.head;
while (p) {
printf("%d ", p->value);
p = p->next;
}
printf("\n");
}
list_head reverse_list(list_head h)
{
list_head nh;
if ((h.head == 0) || (h.head->next ==0)) {
return h;
}
nh.head = h.head->next;
nh.tail = h.tail;
nh = reverse_list(nh);
h.head->next = 0;
nh.tail->next = h.head;
nh.tail = h.head;
return nh;
}
int main()
{
list_head head;
head = init_list();
print_list(head);
head = reverse_list(head);
print_list(head);
return 0;
}

51. Program to display the contents of a file using command line argument

#include "fcntl.h"
main(int x, char *y[], char *z[])
{
int i;
char ch;
if(x<2)
{
printf("Too few parameters\n");
exit(0);
}
for(i=1;i<x;i++)
{
int k=open(y[i],O_RDONLY);
if(k==-1)
{
printf("File not found\n");
break;
}
while(read(k,&ch,1))
printf("%c",ch);
close(k);
}
}

52. Calculate the age of a person after giving the date of the birth.

#include "time.h"
main()
{
char x[100],y[100];
int dd,mm,yy;
int bd,bm,by;
int nd,nm,ny;
unsigned int t;
struct tm *mytime;
t=time(0);
mytime=localtime(&t);
dd=mytime->tm_mday;
mm=mytime->tm_mon+1;
yy=mytime->tm_year+1900;
printf("Enter birtd day,mon and year :");
scanf("%d%d%d",&bd,&bm,&by);
if(dd>=bd)
nd=dd-bd;
else
if(mm==1 || mm==3 || mm==5 || mm==7 || mm==8 || mm==10 || mm==12)
{
dd=dd+31;
nd=dd-bd;
}
else
if(mm==4 || mm==6 || mm==9 || mm==11)
{
dd=dd+30;
nd=dd-bd;
}
else
if(mm==2)
{
dd=dd+28;
nd=dd-bd;
}
if(mm>=bm)
{
nm=mm-bm;
}
else
{
mm=mm+12;
yy=yy-1;
nm=mm-bm;
}
ny=yy-by;
printf("%d %d %d \n",ny,nm,nd);
}

53. Calculate the average marks of student looking at the following table

p1 p2 p3 average Result
>=60% first
>=50 second
>=40 third
avg=(p1+p2+p3)/3;
where p1,p2 and p3 >=30
main()
{
int p1,p2,p3,avg;
printf("Enter Marks for p1 p2 & p3 : ");
scanf("%d%d%d",&p1,&p2,&p3);
avg=(p1+p2+p3)/3;
if(p1>=30 && p2>=30 && p3>=30)
{
if(avg>=60)
printf("First\n");
else
if(avg>=50)
printf("Second\n");
else
if(avg>=40)
printf("Third\n");
else
printf("Failed\n");
}
else
printf("Failed\n");
}

54. Cacluate the amount to be paid after giving the total time.

Time Amount
8 hours 100/-
Next 4 hours 20/- ph
Next 4 hours 30/- ph
Next 4 hours 40/- ph
main()
{
int time,amt;
printf("Enter Total Time :");
scanf("%d",&time);
if(time==8)
amt=100;
else
if(time>8 && time<=12)
amt=100+(time-8)*20;
else
if(time>12 && time<=16)
amt=180+(time-12)*30;
else
if(time>16 && time<=20)
amt=300+(time-16)*40;
else
{
printf("Invalid entry\n");
exit(0);
}
printf("%d", amt);
}

55. Program to convert upper case to lower case

void main()
{
char str[20];
int i;
printf("Enter any string->");
scanf("%s",str);
printf("The string is->%s",str);
for(i=0;i<=strlen(str);i++)
{
if(str[i]>=65&&str[i]<=90)
str[i]=str[i]+32;
}
printf("\nThe string in uppercase is->%s",str);
}

56. Program to calculate the power of a number

void main()
{
int pow,num,i=1;
long int sum=1;
printf("\nEnter a number: ");
scanf("%d",&num);
printf("\nEnter power: ");
scanf("%d",&pow);
while(i<=pow)
{
sum=sum*num;
i++;
}
printf("\n%d to the power %d is: %ld",num,pow,sum);

57. INSERT AN ELEMENT IN AN ARRAY AT DESIRED POSITION

void main()
{
int a[50],size,num,i,pos,temp;
printf("\nEnter size of the array: ");
scanf("%d",&size);
printf("\nEnter %d elements in to the array: ",size);
for(i=0;i<size;i++)
scanf("%d",&a[i]);
printf("\nEnter position and number to insert: ");
scanf("%d %d",&pos,&num);
i=0;
while(i!=pos-1)
i++;
temp=size++;
while(i<temp)
{
a[temp]=a[temp-1];
temp--;
}
a[i]=num;
for(i=0;i<size;i++)
printf(" %d",a[i]);
}
}

58. program to calculate the sum of the following series

1 - x + x2/2! + x3/3! --------to nth term
main()
{
int serise,square,fact=1,loop=1,loop1;
float sum;
float result=0;
printf("Enter The serise ");
scanf("%d",&serise);
while(loop<=serise)
{
square=pow(loop,2);
for(loop1=1;loop1<=loop;loop1++)
{
fact = fact * loop1;
}
sum=(float)square/fact;
if(loop%2!=0)
result = result + sum;
else
result = result - sum;
fact=1;
loop++;
}
printf("The summation Of the serise is %f\n",result);
}

59. Find the weekday of a particular date(ex-6 sep 2010 (monday)

#include "time.h"
#include "stdio.h"
main()
{
char daybuf[20];
int dd,mm,yy;
unsigned int t;
struct tm *mytime;
t=time(0);
mytime=localtime(&t);
dd=mytime->tm_mday;
mm=mytime->tm_mon+1;
yy=mytime->tm_year+1900;
mytime->tm_hour = 0;
mytime->tm_min = 0;
mytime->tm_sec = 1;
mytime->tm_isdst = -1;
printf("Enter the day,mon and year :");
scanf("%d%d%d",&dd,&mm,&yy);
if(mktime(mytime) == -1)
fprintf(stderr, "Unkown -\n");
else
strftime(daybuf, sizeof(daybuf), "%A", mytime);
printf("Itwas a %s\n", daybuf);
}

\