+ All Categories
Home > Documents > B.E./B.Tech. DEGREE EXAMINATION, JANUARY 2014. …aucoe.annauniv.edu/qb/ge6151t.pdf · name,...

B.E./B.Tech. DEGREE EXAMINATION, JANUARY 2014. …aucoe.annauniv.edu/qb/ge6151t.pdf · name,...

Date post: 13-Mar-2018
Category:
Upload: voliem
View: 231 times
Download: 1 times
Share this document with a friend
21
AU COE QP wss Reg. No. : B.E./B.Tech. DEGREE EXAMINATION, JANUARY 2014. First Semester Civil Engineering GE 6151 T — COMPUTER PROGRAMMING (Common to Mechanical Engineering) (Regulation 2013) Time : Three hours Maximum : 100 marks Answer ALL questions. PART A — (10 × 2 = 20 marks) 1. I¢uõ® uø»•øÓ PoÛPÎß •UQ¯ Áßö£õ¸Ò ö©ßö£õ¸Ò öuõÈÀ~m£[PÎÀ ]»ÁØøÓ £mi¯¼kP. List some important hardware and software technologies of fifth generation computers. 2. ÷£õ¼U SÔ•øÓ°ß £s¦PÒ CμsiøÚ GÊxP. Write two characteristics and advantages of pseudocode. 3. ‘C’ ÂøÚUSÔPÎß ÁøPPÒ ¯õøÁ? What are the various types of C operators? 4. 10 •uÀ 1 Áøμ Aa]hz ÷uøÁ¯õÚ for TØøÓ GÊxP. Write a for loop statement to print numbers from 10 to 1. 5. Ao GßÓõÀ GßÚ? Define array. 6. GÊzx \μ[PøÍ øP¯õͨ £¯ß£k® H÷uÝ® Cμsk ¡»Pa \õº¦PÎß ö£¯ºPøÍU TÖP. Name any two library functions used for string handling. Question Paper Code : 37007 T
Transcript
Page 1: B.E./B.Tech. DEGREE EXAMINATION, JANUARY 2014. …aucoe.annauniv.edu/qb/ge6151t.pdf · name, register number and marks of five subjects for 25 students, calculate the percentage and

AU C

OE

QP

wss

Reg. No. :

B.E./B.Tech. DEGREE EXAMINATION, JANUARY 2014.

First Semester

Civil Engineering

GE 6151 T — COMPUTER PROGRAMMING

(Common to Mechanical Engineering)

(Regulation 2013)

Time : Three hours Maximum : 100 marks

Answer ALL questions.

PART A — (10 × 2 = 20 marks)

1. I¢uõ® uø»•øÓ PoÛPÎß •UQ¯ Áßö£õ¸Ò ö©ßö£õ¸Ò öuõÈÀ~m£[PÎÀ ]»ÁØøÓ £mi¯¼kP.

List some important hardware and software technologies of fifth generation

computers.

2. ÷£õ¼U SÔ•øÓ°ß £s¦PÒ CµsiøÚ GÊxP.

Write two characteristics and advantages of pseudocode.

3. ‘C’ ÂøÚUSÔPÎß ÁøPPÒ ¯õøÁ?

What are the various types of C operators?

4. 10 •uÀ 1 Áøµ Aa]hz ÷uøÁ¯õÚ for TØøÓ GÊxP.

Write a for loop statement to print numbers from 10 to 1.

5. Ao GßÓõÀ GßÚ?

Define array.

6. GÊzx \µ[PøÍ øP¯õͨ £¯ß£k® H÷uÝ® Cµsk ¡»Pa \õº¦PÎß ö£¯ºPøÍU TÖP.

Name any two library functions used for string handling.

Question Paper Code : 37007 T

Page 2: B.E./B.Tech. DEGREE EXAMINATION, JANUARY 2014. …aucoe.annauniv.edu/qb/ge6151t.pdf · name, register number and marks of five subjects for 25 students, calculate the percentage and

AU C

OE

QP

wss

37007 T 2

7. \õº¤ß ÷uøÁ GßÚ?

What is the need for functions?

8. _miPÎß £¯ß GßÚ?

What is the uses of pointers?

9. ‘C’ ö©õÈ°À EÒÍ •ßÛø» ö\¯»õUQPÒ CµsiøÚ GÊxP.

Write any two preprocessor directives in C.

10. Aø©¨¦ ©õÔø¯²® J¸ø© ©õÔø¯²® ÷ÁÖ£kzxP.

Differentiate between structure and union.

PART B — (5 × 16 = 80 marks)

11. (a) PoÛPÎß Áͺa] £ØÔ²®, uø»•øÓPÒ £ØÔ²® ÂÍUSP.

Write in detail about the evolution and the various generations of

computers. (16)

Or

(b) Ai¨£øh PoÛ Aø©¨¦ £ØÔ ÂÍUP¨£hzøu öPõsk ›ÁõP ÂÁ›UP.

Explain the basic computer organisation using a neat diagram. (16)

12. (a) ‘C’ ö©õÈ°À EÒÍ Pso¯õUP TØÖPÎß ÷uøÁ £ØÔ²® £À÷ÁÖ ÁøPPÒ £ØÔ²® GkzxUPõmkPÐhß ÂÁõvzx ÂÍUSP.

Write about the need and types of looping statements in C language and

discuss with examples. (16)

Or

(b) ‘C’ ö©õÈ°À EÒÍ QøÍzuÀ TØÖPÎß ÷uøÁ £ØÔ²® £À÷ÁÖ ÁøPPÒ £ØÔ²® GkzxUPõmkPÐhß ÂÁõvzx ÂÍUSP.

Write about the need and types of branching statements in C language

and discuss with examples. (16)

13. (a) (i) J¸ \µzøu •ß¤ßÚõP v¸¨¦® ‘C’ {µø» GÊxP.

(ii) öPõkUP¨£mkÒÍ Gsoß L¤£Úõa] öuõhøµ E¸ÁõUS® ‘C’ {µø» GÊxP.

(i) Write a C program to reverse a string. (8)

(ii) Write a C program to print the Fibonacci series of a given number. (8)

Or

(b) Cµsk AoPÎß TmkzöuõøPø¯ PnUQk® ‘C’ {µø» GÊxP.

Write a C program to find the sum of two matrices. (16)

Page 3: B.E./B.Tech. DEGREE EXAMINATION, JANUARY 2014. …aucoe.annauniv.edu/qb/ge6151t.pdf · name, register number and marks of five subjects for 25 students, calculate the percentage and

AU C

OE

QP

wss

37007 T 3

14. (a) RÌÁ¸ÁÚÁØÔØS ÂÍUP® u¢x GkzxUPõmkhß ÂÁ›UP.

(i) \õº¦ AÔÂzuÀ

(ii) ÷©Ø÷PõÒ AøÇzuÀ, ©v¨¦ AøÇzuÀ.

Explain the following with suitable examples.

(i) Function declaration (8)

(ii) Call by reference, call by value. (8)

Or

(b) (i) ©v¨¦PÎß ©ØÖ® ©v¨¤À»õu \õº¦PøÍ JÆöÁõ¸ Euõµnzxhß ÂÍUSP.

(ii) ©Ö_ÇØ]\õº¦ GßÓõÀ GßÚ? J¸ Euõµn® u¸P.

(i) Explain function with and without arguments with example for

each. (10)

(ii) What is recursion? Give an example. (6)

15. (a) (i) ÷uUP ÁS¨¦ GßÓõÀ GßÚ? £mi¯¼mk, Euõµnzxhß ÂÍUSP.

(ii) J¸ ÷uvø¯ £¯ß£kzu ÷uøÁ¯õÚ Aø©¨¦ ©õÔø¯ Áøµ¯Özx AÔÂUP ö\´P. ÷uv, Gߣx |õÒ, ©õu® ©ØÖ® Á¸h® öPõshuõS®.

(i) What is storage class? List and explain with example. (8)

(ii) Define and declare a structure to store date, which including day,

month and year. (8)

Or

(b) Pmhø©¨¦ (structure) öPõsk ©õnÁ›ß ©v¨ö£s £mi¯ø» E¸ÁõUS® ‘C’ {µø» GÊxP.

Write a C program to create mark sheet for students using structure. (16)

————––––——

Page 4: B.E./B.Tech. DEGREE EXAMINATION, JANUARY 2014. …aucoe.annauniv.edu/qb/ge6151t.pdf · name, register number and marks of five subjects for 25 students, calculate the percentage and

AU C

OE

QP

10-06 1 57408T

Reg. No.

Question Paper Code : 57408T

B.E/B.Tech. DEGREE EXAMINATION, MAY/JUNE 2016

First Semester

Civil Engineering

GE 6151T – COMPUTER PROGRAMMING

(Common to Mechanical Engineering)

(Regulations 2013)

Time : Three Hours Maximum : 100 Marks

Answer ALL questions.

PART – A (10 × 2 = 20 Marks)

1. Classify the computers based on performance, size, cost and capacity.

ùNVp§\u, A[Ü, ¨û]YûL A[Ü, úYLm, ®ûX

B¡VYtû\ ûYjÕ CXdLdL¦lùTô±Lû[ YûLlTÓjRÜm.

2. Convert the binary number 10110111.1101 into decimal number.

CÚ¨ûX Gi 10110111.1101 I T§uU¨ûX GiQôL Uôt\Üm.

3. What are variables ? Give examples.

Uô±Ls Gu\ôp Gu] ? GÓjÕdLôhÓLs RÚL.

4. Define implicit type conversion.

Eh¡ûP C]Uôt\m Gu\ôp Gu] ?

Page 5: B.E./B.Tech. DEGREE EXAMINATION, JANUARY 2014. …aucoe.annauniv.edu/qb/ge6151t.pdf · name, register number and marks of five subjects for 25 students, calculate the percentage and

AU C

OE

QP

2 57408T

5. What is an array ?

A¦Ls Gu\ôp Gu] ?

6. Define string. Give examples.

NWm Gu\ôp Gu] ?

7. Specify the advantages of functions.

ùNVpáß®u SuûULs VôûY ?

8. How is pointer arithmetic done ?

ÑhÓ LQd¸Ó GqYôß ùNVpTÓ¡\Õ.

9. What do you mean by structures ?

LhÓÚ Gu\ôp Gu] ?

10. State the importance of union.

áhÓÚ®u Ød¡VjÕYm Gu] ?

PART – B (5 × 16 = 80 Marks)

11. (a) (i) Describe the basic computer organization with neat diagram.

L¦lùTô±«u ùNVp TôLeLû[ TPm YûWkÕ

®Y¬dLÜm. (10)

(ii) Draw the flowchart to solve the quadratic equation.

CÚT¥ ¨LolTôhûP ¾olTRtLô] TônÜlTPm

YûWL. (6)

OR

(b) (i) Explain the various generations of computers.

L¦lùTô±«u RûXØû\Lû[ ®[dÏL. (8)

(ii) What is pseudo code ? Explain its guidelines and benefits.

úTô−d ϱØû\ Gu\ôp Gu] ? ARtLô]

Y¯LôhÓRpLs Utßm TXuLû[ ®Y¬dLÜm. (8)

Page 6: B.E./B.Tech. DEGREE EXAMINATION, JANUARY 2014. …aucoe.annauniv.edu/qb/ge6151t.pdf · name, register number and marks of five subjects for 25 students, calculate the percentage and

AU C

OE

QP

3 57408T

12. (a) (i) Explain the different types of operators available in C.

‘£’ ùUô¯«Ûs[ ùNnϱL°u YûLLû[

®Y¬dLÜm. (10)

(ii) Discuss the basic data types in C.

‘£’ ùUô¯«Ûs[ A¥lTûP RW®]eLû[

®Y¬dLÜm. (6)

OR (b) (i) Describe the various input and output statements in C with suitable

examples.

‘£’ ùUô¯«Ûs[ Aû]jÕ EsÇhÓ Utßm ùY°ÂhÓd átßLû[ GÓjÕdLôhÓLÞPu ®Y¬dLÜm. (10)

(ii) Write a C program for the following series : (6)

1 + 2 + 3 + 4 + ……. + n

¸rdLiP ùRôPûW ¾olTRtLô] ‘£’ ¨Wp GÝÕL. 1 + 2 + 3 + 4 + ……. + n

13. (a) (i) Write a C program to count the number of vowels in your name. EeLs ùTV¬p Es[ E«ùWÝjÕdLû[ Gi¦f

ùNôpÛm ‘£’ ¨Wp GÝÕL. (6)

(ii) Write a C program to multiply two matrices.

CWiÓ A¦dúLôûY ùTÚdLp ùNnV ‘£’ ¨Wp GÝÕÜm. (10)

OR

(b) (i) Write a C program to check whether the given string is palindrome or not.

ùLôÓdLlThP JÚ NWm Tô−ihúWôm NWUô GuTûRd LiP±kÕ ùNôpX ‘£’ ¨Wp GÝÕL. (6)

(ii) Write a C program to arrange the given 10 numbers in descending order.

JÚ Y¬ûN«Ûs[ 10 GiLû[d Ïû\kÕ ùNpÛm Y¬ûN Øû\«p JÝeÏ AûUdL ‘£’ ¨Wp GÝÕL. (10)

14. (a) (i) Write a C program to find the smallest and largest number from the given

10 numbers using functions.

JÚ ùNVpáû\l TVuTÓj§ 10 GiL°−ÚkÕ JÚ £±V Gi Utßm ùT¬V GiûQ LiÓ©¥lTRtLô]

‘£’ ¨Wp GÝÕL. (10)

(ii) Explain the pass by reference with an example.

ϱl× êXm AûZjRûX GÓjÕdLôhÓPu

®Y¬dLÜm. (6)

Page 7: B.E./B.Tech. DEGREE EXAMINATION, JANUARY 2014. …aucoe.annauniv.edu/qb/ge6151t.pdf · name, register number and marks of five subjects for 25 students, calculate the percentage and

AU C

OE

QP

4 57408T

OR

(b) (i) Write a C program to find the factorial of a given number using recursion.

ùLôÓdLlThP Gi¦u ùRôPoùTÚdLp LiÓ©¥dL ÑZp ùNVpTôhÓ ùNVpáßûY

TVuTÓj§ ‘£’ ¨Wp GÝÕL. (8)

(ii) Write a C program to count the number of words in a string using

pointers.

JÚ NWj§Ûs[ YôojûRL°u Gi¦dûL«û]

LiP±V ÑhÓLû[ TVuTÓj§ ‘£’ ¨Wp GÝÕL. (8)

15. (a) Define a structure called student would contain name, register number and

marks of five subjects and percentage. Write a program to read the details of

name, register number and marks of five subjects for 25 students, calculate the

percentage and display the name, register number, marks of 25 subjects,

percentage of all the students and also the name of the student who got highest

percentage among the 25 students.

T§Ü Gi, ùTVo, 5 TôPeL°u U§lùTiLs Utßm U§lùTi ®¡Rm B¡V ×XeLû[d ùLôiÓ UôQYo LhÓÚûY YûWVû\ ùNnVÜm. JÚ YÏl©p Es[ 25 UôQYoL°u T§Ü Gi, ùTVo Utßm 5 TôPeL°u U§lùTiLû[ EsÇÓ ùNnÕ JqùYôÚ UôQY¬u U§lùTi ®¡RjûR LQd¸Ó ùNnÕ, T§Ü Gi, ùTVo, 5 TôPeL°u U§lùTiLs, U§lùTi ®¡Rm, Utßm YÏl©p ØRp U§lùTi ùTt\ UôQY¬u ùTVûW

ùY°ÂÓ ùNnV ‘£’ ¨Wp GÝÕL. (16)

OR

(b) (i) Explain the various storage classes in C.

‘£’ ùUô¯«Ûs[ úNªl× C]dÏÝdL°u YûLLû[

®Y¬dLÜm. (8)

(ii) Describe about the preprocessors with suitable example.

Øu ùNV− Tt± ®¬YôL GÓjÕdLôhÓLÞPu

GÝRÜm . (8)

___________

Page 8: B.E./B.Tech. DEGREE EXAMINATION, JANUARY 2014. …aucoe.annauniv.edu/qb/ge6151t.pdf · name, register number and marks of five subjects for 25 students, calculate the percentage and

AU C

OE

QP

WSS

Reg. No. :

B.E./B.Tech. DEGREE EXAMINATION, APRIL/MAY 2017.

First Semester

Mechanical Engineering

GE 6151 T — COMPUTER PROGRAMMING

(Common to Civil Engineering)

(Regulations 2013)

Time : Three hours Maximum : 100 marks

Answer ALL questions.

PART A — (10 2 = 20 marks)

1. ‘Algorithm’ GßÓõÀ GßÚ?

What is an algorithm?

2. ‘Flow chart’ GßÓõÀ GßÚ?

What is flow chart?

3. ‘Problem solving’ Gߣuß £À÷ÁÖ ‘steps’-I GÊuÄ®&

What are the main steps of problem solving?

4. C ö©õÈ°À Põn¨£k® ‘constants’ ÁøPPøÍ GÊuÄ®.

What are the different types of constants available in C?

5. C ö©õÈ°À Põn¨£k® ‘string functions’ ÁøPPøÍ GÊxP.

List out any four string handling functions.

6. ‘Array’ GßÓõÀ GßÚ? J¸ C¸ £›©õn ‘Array’-I GÆÁõÖ E¸ÁUSúPÒ

GߣuøÚ GÊxP.

What is an array? How will you create a 2D array?

7. ‘Function’ Gߣuß £» TÖPøÍ GÊxP.

What are the components of a function?

Question Paper Code : 71938 T

Page 9: B.E./B.Tech. DEGREE EXAMINATION, JANUARY 2014. …aucoe.annauniv.edu/qb/ge6151t.pdf · name, register number and marks of five subjects for 25 students, calculate the percentage and

AU C

OE

QP

WSS

71938 T 2

8. C ö©õÈ°À ‘dynamic memory allocation’ GßÓõÀ GßÚ? AuØS ÷uøÁ¯õÚ ‘functions’ ¯õøÁ?

What is dynamic memory allocation? What are the various dynamic memory allocation functions?

9. C ö©õÈ°À ‘storage classes’ GßÓõÀ GßÚ AøÁPÎß ÁøPPøÍ GÊxP?

What are storage classes? What are the storage classes available in C?

10. C ö©õÈ°À ‘pre-processor directives’ GßÓõÀ GßÚ?

Define pre-processor directives in C.

PART B — (5 16 = 80 marks)

11. (a) P®¨³mh›ß £À÷ÁÖ ÁøPPøÍ (classifications of computers) ›ÁõP

ÂÍUQ GÊxP.

Explain the various classifications of computers in detail.

Or

(b) P®¨³mh›À £¯ß£kzu¨£k® £À÷ÁÖ Gs •øÓPøÍ (number systems) ÂÍUQ ›ÁõP GÊxP.

Explain the various number systems in detail.

12. (a) C ö©õÈ°À £¯ß£kzu¨£k® £À÷ÁÖ ‘operators’ GøÁ GÚ ÂÍUP©õP

GÊxP. ÷©¾® AøÁPøÍ J¸ ‘program’ ‰»©õP GÆÁõÖ £¯ß£kzuÁx

Gߣøu ÂÍUSP.

Explain various operators in C Language in detail.

Or

(b) C ö©õÈ°À £¯ß£kzu¨£k® £À÷ÁÖ ÁøP¯õÚ ‘input and output functions’ GøÁ GÚ ÂÍUP©õP GÊuÄ®.

Explain various input and output functions of C language in detail.

13. (a) C ö©õÈ°ß ‘strings concept’ ©ØÖ® Auß £»ÁøP¯õÚ ÂÍUP©õP J¸ ‘program’ GÊv ÂÍUSP.

Explain the concept of strings in detail.

Or

(b) (i) öPõkUP¨£mh J¸ array-I GÆÁõÖ sort ö\´Áx GߣuØS

C ö©õÈ°À J¸ program GÊv ›ÁõP ÂÍUP® u¸P.

(ii) ‘Binary search’ •øÓø¯ öPõsk J¸ “element” “array”CÀ

C¸UQÓuõ GßÖ AÔÁuØS J¸ “program” GÊxP.

(i) Explain sorting of a one dimensional array with example program.

(ii) Write a program to check whether an element in present or not in an array or not using binary search method.

Page 10: B.E./B.Tech. DEGREE EXAMINATION, JANUARY 2014. …aucoe.annauniv.edu/qb/ge6151t.pdf · name, register number and marks of five subjects for 25 students, calculate the percentage and

AU C

OE

QP

WSS

71938 T 3

14. (a) C ö©õÈ°À ‘concept of parameter passing’ GߣuøÚ £À÷ÁÖ •øÓPÎÀ

GÆÁõÖ ö\¯À£kzu¨£kQÓx GߣuøÚ J¸ program GÊv ÂÍUSP.

(i) value

(ii) reference between functions GkzxUPõmkhß Â›ÁõP ÂÁ›.

Explain the concept of parameter passing by

(i) value and

(ii) reference between functions in detail with example program.

Or

(b) C ö©õÈ°À £¯ß£kzu¨£k® ‘pointer concept’-I ÂÍUP©õP program GÊv ÂÍUSP.

Explain in detail the concept of pointer in C language.

15. (a) C ö©õÈ°À Põn¨£k® £À÷ÁÖ ‘storage classes’ ÁøPPøÍ ÂÍUP©õP J¸

‘program’ GÊv ÂÍUSP.

Explain various storage classes used in C with example program in detail.

Or

(b) C ö©õÈ°À £¯ß£kzu¨£k® ‘structure concept’-I²® AuÝøh¯

•UQ¯zxÁ[PøͲ® J¸ program ‰»©õP ÂÍUQ GÊxP.

Explain in detail the concept and importance of structures with example program in C language.

————–––––––—

Page 11: B.E./B.Tech. DEGREE EXAMINATION, JANUARY 2014. …aucoe.annauniv.edu/qb/ge6151t.pdf · name, register number and marks of five subjects for 25 students, calculate the percentage and

AU C

OE

QP

Ws 20

Reg. No. :

B.E./B.Tech. DEGREE EXAMINATION, APRIL/MAY 2015.

First Semester

Civil Engineering

GE 6151 T — COMPUTER PROGRAMMING

(Common to Mechanical Engineering)

(Regulation 2013)

Time : Three hours Maximum : 100 marks

Answer ALL questions.

PART A — (10 2 = 20 marks)

1. «U Po¨ö£õÔ GßÓõÀ GßÚ? GkzxUPõmk u¸P.

What is super computer? Give an example.

2. ÷£õ¼U SÔ•øÓ GßÓõÀ GßÚ?

Define pseudo code.

3. ‘]’ ö©õÈ°¾ÒÍ ]Ó¨¦ ö\õØPÎß •UQ¯zxÁ® GßÚ?

What is the importance of keywords in C?

4. ‘]’ ö©õÈ°¾ÒÍ ]» EÒÏmk ©ØÖ® öÁαmkU TØÖPøÍ u¸P.

List the various input and output statements in C.

5. Ao GßÓõÀ GßÚ? GkzxUPõmk u¸P.

What is an array? Give an example.

6. J¸ GÊzxa\μ® GÆÁõÖ AÔ¨¦ ö\´¯¨£kQÓx?

How is a character string declared?

7. ö©´¯õÚ Aͦ¸UPÒ ©ØÖ® •øÓ¯õÚ Aͦ¸UPÒ & J¨¤kP.

Compare actual parameters and formal parameters.

Question Paper Code : 77156 T

Page 12: B.E./B.Tech. DEGREE EXAMINATION, JANUARY 2014. …aucoe.annauniv.edu/qb/ge6151t.pdf · name, register number and marks of five subjects for 25 students, calculate the percentage and

AU C

OE

QP

Ws 20

77156 T 2

8. RÌUPsh ‘]’ {μ¼ß öÁαk GßÚ?

#include<stdio.h> main ( ) { int a=8, b=4, c, *p1=&a, *p2=&b ; c=*p1**p2-*p1/*p2+9; printf(“%d”,c);

}

What is the output of the following program? main ( ) { int a=8, b=4, c, *p1=&a, *p2=&b ; c=*p1**p2-*p1/*p2+9;

printf(“%d”,c); }

9. Pmk¸ GßÓõÀ GßÚ?

What do you mean by structures?

10. •ß ö\¯¼°ß £¯ß£õk GßÚ?

Give the use of preprocessor.

PART B — (5 16 = 80 marks)

11. (a) (i) Po¨ö£õÔ°ß uø»•øÓPøÍ ÂÍUSP.

(ii) £vß©{ø» Gs, 681.75 &I C¸{ø» Gs, Gmk{ø» Gs ©ØÖ®

£vÚõÖ {ø» GsnõP ©õØÓÄ®.

(i) Describe various generations of computers. (10)

(ii) Convert the decimal number 681.75 into binary, octal and hexadecimal equivalent. (6)

Or

(b) (i) Po¨ö£õÔ°ß ö\¯À £õP[PøÍ £h® Áøμ¢x ÂÁ›UPÄ®.

(ii) öPõkUP¨£mh Gs §ä⯩õ, ÷|º© Gsnõ, Gvº© Gsnõ

GߣuøÚ PshÔ¯ £õ´Ä¨£h® ÁøμP.

(i) Explain the basic organization of a computer with neat diagram. (10)

(ii) Draw a flowchart to check whether the given number is zero, positive or negative. (6)

Page 13: B.E./B.Tech. DEGREE EXAMINATION, JANUARY 2014. …aucoe.annauniv.edu/qb/ge6151t.pdf · name, register number and marks of five subjects for 25 students, calculate the percentage and

AU C

OE

QP

Ws 20

77156 T 3

12. (a) (i) ‘]’ ö©õÈ°¾ÒÍ ö\¯ØSÔPÎß ÁøPPøÍ ÂÁ›UPÄ®.

(ii) ©õÔ¼PÒ GßÓõÀ GßÚ? Auß ÁøPPøÍ ÂÁ›UPÄ®.

(i) Explain the different types of operators available in C. (8)

(ii) What are constants? Explain the various types of constants in C. (8)

Or

(b) (i) ‘]’ ö©õÈ°¾ÒÍ ©hUSU TØÖPøÍ GkzxUPõmkhß ÂÁ›UPÄ®.

(ii) C¸£i {Pº¨£õmøh wº¨£uØPõÚ ‘]’ {μÀ GÊuÄ®.

(i) Describe the various looping statements used in C with suitable examples. (8)

(ii) Write a C program to solve the quadratic equation. (8)

13. (a) (i) Cμsk AoU÷PõøÁ TmhÀ ‘]’ {μÀ GÊuÄ®.

(ii) öPõkUP¨£mh J¸ Á›ø\°À EÒÍ ‘n’ GsPÎÀ J¸ Gs EÒÍuõ

GߣøuU Psk¤iUP ‘]’ {μÀ GÊxP.

(i) Write a C program to add two matrices. (10)

(ii) Write a C program to search a given number in an array of elements. (6)

Or

(b) (i) J¸ Á›ø\°¾ÒÍ 10 GsPøÍ HÖ® Á›ø\ •øÓ°À JÊ[S Aø©UP

‘]’ {μÀ GÊxP.

(ii) GÊzxa\μ[PøÍ øP¯õЮ £» ö\¯ÀTÖPÒ ¯õøÁ? ÂÁ›UPÄ®.

(i) Write a C program to arrange the given 10 numbers in ascending order. (10)

(ii) Explain the various string handling functions. (6)

14. (a) (i) J¸ ö\¯ÀTøÓ¨ £¯ß£kzv öPõkUP¨£mh Gsoß öuõhº

ö£¸UPÀ Psk¤iUP ‘]’ {μÀ GÊxP.

(ii) SÔ¨¦ ‰»® AøÇzuø»¨ £¯ß£kzv Cμsk GsPÎß ©v¨¦PøÍ

Ch® ©õØÔ Aø©UP J¸ ‘]’ {μÀ GÊxP.

(i) Write a C program to find the factorial of a given number using function. (8)

(ii) Write a C program to exchange the values of two variables using pass by reference. (8)

Or

Page 14: B.E./B.Tech. DEGREE EXAMINATION, JANUARY 2014. …aucoe.annauniv.edu/qb/ge6151t.pdf · name, register number and marks of five subjects for 25 students, calculate the percentage and

AU C

OE

QP

Ws 20

77156 T 4

(b) (i) öPõkUP¨£mh Gsoß C»UP[PÎß Tmkz öuõøPø¯ Psk¤iUP

_ÇÀ ö\¯À£õmk ö\¯À TÖøÁ £¯ß£kzv ‘]’ {μÀ GÊxP.

(ii) _mkøÁ £¯ß£kzv J¸ AoUS ÷uøÁ¯õÚ EÖ¨¦PøÍ EÒÏk

ö\´x AÁØøÓ v¸¨¤ Á›ø\°À öÁαk ö\´¯ ‘]’ {μÀ GÊuÄ®.

(i) Write a C program to find the sum of the digits using recursive function. (8)

(ii) Write a C program using pointers to read in an array of integers and print its elements in reverse order. (8)

15. (a) ¦zuPzvß ö£¯º, ¦zuP B]›¯º ©ØÖ® Auß Âøø» BQ¯ ¦»[PøÍU

öPõsk ¦zuP® GßÓ Pmk¸øÁ Áøμ¯øÓ ö\´¯Ä®. J¸ ¡»PzvÀ EÒÍ

200 ¦zu[PÎß ö£¯º, ¦zuP B]›¯º ©ØÖ® Auß Âø» BQ¯ £μ[PøÍ

EÒÏk ö\´¯Ä®. A¢u ¡»Pzv¾ÒÍ ö©õzu ¦zu[PÎß Âø» ©v¨¦

©ØÖ® 500 ¹£õ°ØS ÷©Ø£mh Âø»²øh¯ ¦zu[PÎß Â£μ[PøÍ

öÁαk ö\´¯ ‘]’ {μÀ GÊxP.

Define a structure called book with book name, author name and price. Write a C program to read the details of book name, author name and price of 200 books in a library and display the total cost of the books and the book details whose price is above Rs.500. (16)

Or

(b) (i) ‘]’ ö©õÈ°¾ÒÍ ÷\ª¨¦ CÚUSÊUPÎß ÁøPPøÍ ÂÁ›UPÄ®.

(ii) Tmk¸ GßÓõÀ GßÚ? GkzxUPõmkhß ÂÁ›UPÄ®.

(i) Explain the various storage classes in C. (10)

(ii) What is union? Discuss with an example. (6)

—————————

Page 15: B.E./B.Tech. DEGREE EXAMINATION, JANUARY 2014. …aucoe.annauniv.edu/qb/ge6151t.pdf · name, register number and marks of five subjects for 25 students, calculate the percentage and

AU C

OE

QP

wk14

Reg. No. :

B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER 2016.

First Semester

Civil Engineering

GE 6151 T — COMPUTER PROGRAMMING

(Common to Mechanical Engineering)

(Regulations 2013)

Time : Three hours Maximum : 100 marks

Answer ALL questions.

PART A — (10 2 = 20 marks)

1. PoÛ°ß TÖPøÍ GÊxP.

State the components of a computer.

2. ¤ßÁ¸ÁÚÁØøÓ J¸ E¸Â¼¸¢x ©ØöÓõ¸ E¸ÂØS ©õØÖP.

(0100101000000001)2 = (x)16 and (E7A9)16 = (x)10

Convert the following numbers in one format to other format mentioned :

(0100101000000001)2 = (x)16 and (E7A9)16 = (x)10

3. C&À EÒÍ £À÷ÁÖ uPÁÀ ÁøPPÒ ¯õøÁ?

What are the data types available in C?

4. öÁõ´À (While) TØÖUS® l... (Do...) TØÖUS® EÒÍ ÷ÁÖ£õkPøÍ GÊxP.

Differentiate between While statement from Do... While statement.

5. Á›ø\UQμ©® (Array) Gߣx GßÚ? J¸ Á›ø\ø¯ öuõhUPÄ®, •iUPÄ® EuÄ®

C»UPn ÂvPøÍ (syntax) GÊxP.

What is an array? Give the syntax of declaring an array and initializing it.

Question Paper Code : 80502 T

Page 16: B.E./B.Tech. DEGREE EXAMINATION, JANUARY 2014. …aucoe.annauniv.edu/qb/ge6151t.pdf · name, register number and marks of five subjects for 25 students, calculate the percentage and

AU C

OE

QP

wk14

80502 T 2

6. C&À ìi›[øé (strings) GÆÁõÖ •i¨£õ´?

How do you declare strings in ‘C’?

7. C&À EÒÍ TÖPÒ ¯õøÁ? C&À J¸ TØÔøÚ GÆÁõÖ Áøμ¯Ö¨£õ´?

What are functions in C? How will you define a function in C?

8. ¦ÒÎ SÔ¨£õß (Pointer) Gߣx GßÚ? Auß £¯ßPÒ ¯õøÁ?

What is a Pointer? What are the use of Pointers?

9. C&À J¸ Pmhø©¨ø£ GÆÁõÖ Áøμ¯øÓ ö\´Áõ´? Auß £¯ß GßÚ?

How will you define a structure in ‘C’? What is the use of it?

10. C&À J¸[Qøn¨¦ Gߣx GßÚ? C&À AuøÚ GÆÁõÖ Áøμ¯øÓ ö\´Áõ´?

What is Union in C? How to define a union in C?

PART B — (5 16 = 80 marks)

11. (a) {μÀö|Ô•øÓ ©ØÖ® ÷£õ¼ SÔ±möhsøn ÂÁ›. ‘n’ GsPÎß

TmkzöuõøPø¯ Põq® Euõμnzxhß Kmh Áøμ£hzvøÚ ÂÁ›.

Explain about algorithm, pseudocode and flow chart with an example of finding the sum of ‘n’ number.

Or

(b) J¸ öuÎÁõÚ £hzxhß J¸ PoÛ°ß Ai¨£øh Aø©¨¤øÚ ÂÁ›.

Explain the basic organization of a computer with a neat diagram in detail.

12. (a) J¸ öuÎÁõÚ Euõμnzxhß ‘C’ ö©õÈ°À EÒÍ QøÍ Pmhø©¨¦PÒ,

©ØÖ® Pso¯õUP Pmhø©¨¦PøÍ ÂÁ›.

Explain about various branching structures and looping structures in C language with example program for each.

Or

(b) J¸ ]ÖxskSÔ±mkhß EÒÏk ©ØÖ® öÁαk ö\¯À£õkPøÍ

{ºÁQ¨£x £ØÔ GÊxP. Scanf( ), printf( ), gets( ), getchar ( ), and getch( ) BQ¯ÁØÖUPõÚ C»UPn ÂvPøÍ GÊxP.

Explain about the managing of input and output operations in ‘C’. With a snippet code, explain the syntax of scanf( ), printf( ), gets( ), getchar ( ), getch( ).

Page 17: B.E./B.Tech. DEGREE EXAMINATION, JANUARY 2014. …aucoe.annauniv.edu/qb/ge6151t.pdf · name, register number and marks of five subjects for 25 students, calculate the percentage and

AU C

OE

QP

wk14

80502 T 3

13. (a) J¸ GkzxUPõmkhß Á›ø\UQμ© ÷Põm£õkPøÍ ÂÁ›.

Explain the concept of arrays in detail with an example program.

Or

(b) ‘C’ ö©õÈ°À öPõkUP¨£mh Cμsk AoPÎß (i) TkuØ£»ß, ©ØÖ®

(ii) ö£¸UPØ£»ß Põn PmhøÍ ö|ÔPøÍ GÊxP.

Write a program in C to (i) Add and (ii) Multiply two given matrices.

14. (a) ©v¨¦ ÷uºÄ ©ØÖ® J¨¥mkz ÷uºÄ BQ¯ÁØÔøÚ GkzuUPõmkPÐhß

ÂÁ›.

Explain about pass by value and pass by reference with an example program for each.

Or

(b) Á›ø\UQμ©zvß _miUPõmi ©ØÖ® _miPõmiPÎß Á›ø\UQμ©[PøÍ

PmhøÍ ö|Ô•øÓ Euõμn[PÐhß ÂÁ›.

With an example program explain about pointer to an array and array of pointers.

15. (a) (i) J¸ Euõμn ö|Ô•øÓ²hß ‘C’&À EÒÍ öuõS¨¦ ©õÔ¼ø¯ ÂÁ›.

(ii) •ß ö\¯À£õkPÎß ö|Ô•øÓPøͨ £ØÔ ]ÖSÔ¨¦ GÊxP.

(i) Explain about union variable in C with an example program in detail.

(ii) Write short notes on pre-processor directives.

Or

(b) Á›ø\UQμ© Pmhø©¨¦Pøͨ £¯ß£kzv ©õnÁºPÎß ©v¨ö£s

ö\¯À£õmk £¯ßPøÍ E¸ÁõUS® PmhøÍ ö|Ô•øÓPøÍ GÊxP.

Write a program to create students mark processing application using array of structure.

—————————

Page 18: B.E./B.Tech. DEGREE EXAMINATION, JANUARY 2014. …aucoe.annauniv.edu/qb/ge6151t.pdf · name, register number and marks of five subjects for 25 students, calculate the percentage and

AU C

OE

QP

wk12

Reg. No. :

B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER 2014.

First Semester

Civil Engineering

GE 6151 T — COMPUTER PROGRAMMING

(Common to Mechanical Engineering)

(Regulation 2013)

Time : Three hours Maximum : 100 marks

Answer ALL questions.

PART A — (10 2 = 20 marks)

1. Flow chart : Áøμ¯øÓ ö\´P. GuØPõP flow chart ÷uøÁ¨£kQÓx?

Define flow chart. Why is flow chart required?

2. Algorithm GßÓõÀ GßÚ?

What is an algorithm?

3. Variable GßÓõÀ GßÚ Gߣøu Euõμnzxhß ÂÍUPÄ®.

What is a variable? Illustrate with an example.

4. Ternary operator&US J¸ Euõμn® u¸P.

Give an example for Ternary operator.

5. I¢x AÍÄÒÍ float array JßøÓ E¸ÁõUQ AvÀ I¢x ©v¨¦PøÍ ÷\ºUPÄ®.

Declare a float array of size 5 and assign 5 values to it.

6. String array xÁUPzvØS J¸ Euõμn® u¸P.

Give an example for initialization of string array.

Question Paper Code : 97078 T

Page 19: B.E./B.Tech. DEGREE EXAMINATION, JANUARY 2014. …aucoe.annauniv.edu/qb/ge6151t.pdf · name, register number and marks of five subjects for 25 students, calculate the percentage and

AU C

OE

QP

wk12

97078 T 2

7. Function GßÓõÀ GßÚ?

What is a function?

8. Address operator ©ØÖ® indirection operator – ÂÍUPÄ®.

What is an address operator and indirection operator?

9. Static storage class : Áøμ¯øÓ ö\´P.

Define static storage class.

10. #define preprocessor&ß E£÷¯õP® GßÚ?

What is the use of #define preprocessor?

PART B — (5 16 = 80 marks)

11. (a) (i) Digital PoÛ°ß EÒPmhø©¨¦ £ØÔ AuØPõÚ £hzxhß ÂÍUPÄ®.

(ii) Pseudo code GßÓõÀ GßÚ? uØPõ¼P ©õÔø¯ £¯ß£kzuõ©À C¸

©õÔPÎß ©v¨¦PøÍ £›©õØÓ® ö\´²® pseudo code JßøÓ

GÊuÄ®.

(i) Explain in detail with neat diagram about the digital computer organization and each of its unit. (10)

(ii) What is pseudo code? Write a pseudo code for swapping two numbers without using temporary storage. (6)

Or

(b) (i) RÌPshÁØøÓ ö\´P :

(1) (100101)2 – (11111001)2

(2) (1011101)2 (1011)2

(3) (2A947)H = ( ? )2

(4) (4872) = ( ? )8

(ii) Logical analysis&ß ÷uøÁø¯ J¸ Euõμnzxhß _¸UP©õP ÂÍUSP.

(i) Perform the following : (12)

(1) (100101)2 – (11111001)2

(2) (1011101)2 (1011)2

(3) (2A947)H = ( ? )2

(4) (4872) = ( ? )8

(ii) Discuss the need for Logical Analysis with an example in brief. (4)

Page 20: B.E./B.Tech. DEGREE EXAMINATION, JANUARY 2014. …aucoe.annauniv.edu/qb/ge6151t.pdf · name, register number and marks of five subjects for 25 students, calculate the percentage and

AU C

OE

QP

wk12

97078 T 3

12. (a) ‘‘C’’ ö©õÈ°À AøÚzxÂu B£÷μmhºPÒ SÔzx Euõμnzxhß ÂÍUPÄ®.

What are the various operators available in C? Discuss each one of them with suitable illustrations. (16)

Or

(b) ‘‘C’’ ö©õÈ°ß AøÚzxÂu looping SÔ±kPøÍ Euõμnzxhß ÂÍUPÄ®.

Explain in detail about various looping structures available in C with illustrative programs. (16)

13. (a) (i) GsPøÍ Á›ø\¨£kzu ‘‘C’’ {μÀ JßøÓ GÊuÄ®.

(ii) £À÷ÁÖ string operation&PøÍ ÂÁ›UPÄ®. Library&°À EÒÍ

HØPÚ÷Á Pmhø©UP¨£mh {μø» £¯ß£kzuõ©À J¸ string&ß

}ÍzøuU PshÔ²® C {μø» GÊxP.

(i) Write a C program for sorting an array of numbers. (8)

(ii) Explain the various string operations. Write a C program to find out the length of the string without using builtin function. (8)

Or

(b) (i) ÷©m›Uì ö£¸UP¾US ‘‘C’’ {μÀ JßøÓ GÊuÄ®.

(ii) J¸ array&À J¸ SÔ¨¤mh Gsøn ÷ukÁuØPõÚ C {μø» GÊxP.

(i) Write a C program to multiply two matrices. (8)

(ii) Write a C program to search an element in a given array. (8)

14. (a) Function GßÓõÀ GßÚ? Call by value ©ØÖ® call by reference £ØÔ

Euõμnzxhß ÂÍUPÄ®.

What is a function in C? Discuss about call by value and call by reference with illustrations. (16)

Or

(b) Recursion GßÓõÀ GßÚ? Euõμnzxhß ÂÍUPÄ®. ÷©¾® J¸ Gsoß

power Psk¤iUP recursion function ©ØÖ® iterative function BQ¯ÁØøÓ GÊuÄ®.

What is recursion? Explain a recursive function with suitable example. Write a iterative and recursive function to find the power of a number. (16)

Page 21: B.E./B.Tech. DEGREE EXAMINATION, JANUARY 2014. …aucoe.annauniv.edu/qb/ge6151t.pdf · name, register number and marks of five subjects for 25 students, calculate the percentage and

AU C

OE

QP

wk12

97078 T 4

15. (a) (i) Structure GßÓõÀ GßÚ? ÷©¾® £À÷ÁÖ data members EÒÍÁõÖ

structure JßøÓ E¸ÁõUQ Auß C¸ ©õÔPøÍ AÔÂUPÄ®. CƸ

structure ©õÔPЮ uS¢u structure ©v¨¦PøÍ EÒÁõ[Q vøμ°À

öÁΰh ÷Ásk®. CuØPõÚ J¸ C {μø» GÊxP.

(ii) Structured data type&ß ÷uøÁø¯ ÂÍUSP.

(i) What is a structure? Create a structure with data members of various types and declare two structure variables. Write a program to read data into these and print the same. (10)

(ii) Justify the need for structured data type. (6)

Or

(b) ]Ö SÔ¨¦ ÁøμP :

(i) Unions

(ii) Register storage class

(iii) # include statement

(iv) # ifndef...#endif

Write short notes on : (4 4 = 16)

(i) Unions

(ii) Register storage class

(iii) # include statement

(iv) # ifndef...#endif

———————


Recommended