Programming in C University QP
Programming in C University QP
i) strlen(). (4)
i) Singly linked list and operations (insertion, deletion, searching) with code
segment. (10)
15. a) Explain the types of file processing with its suitable application.
(OR)
b) Write a C program to do the following.
___________________
Reg. No. :
Second Semester
CS 8251 – PROGRAMMING IN C
(Regulations 2017)
10. Distinguish between text mode and binary mode operation of a file.
PART B — (5 × 16 = 80 marks)
11. (a) (i) Explain enumeration constants with an example program. (8)
(ii) Write a ‘C’ program to compute student grades using switch case
statement. The input to be program are marks of 5 subjects,
compute the total and average and find respective grade of the
students. (8)
Grades
>90 ‘S’
80-90 A
70-79 B
60-69 C
50-59 D
40-49 E
<40 F
Or
12. (a) What is string? Explain about declaration and initialization of string in
‘C’. How strings are displayed with different formats? Explain with
examples.
Or
13. (a) Explain different string handling functions available in C with examples.
Or
14. (a) Explain nested structure and self-referential structure with an example.
Or
(b) Define a structure. Describe how to declare and initialize structure and
its members with an example.
2 40386
15. (a) Explain about the fopen (), fclose(), feof(), fprintf(), fscanf(), fseek() and
rewind() functions.
Or
(b) Create two text files and write a C program to add to contents of one file
at the end of another.
—————————
3 40386
Reg. No.
9. Define Array.
10. What is the use of pointer ?
16-06 1 51644
PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor
PART -B (5 x 16 = 80 Marks)
(16)
11. (a) Explain in detail about basic computer organization with a neat sketch.
OR
classification of
(b) What are the applications of computer ? Discuss in detail about
(16)
computer.
(8)
12. (a) (i) Explain in detail the types of computer software.
(8)
(ii) Explain in detail the various steps involved in software development.
OR
(6)
(b) (i) Explain the common types of internet access.
Write short note on web browser. (5)
(ii)
(5)
(iii) Explain a typical structure of URL.
(10)
13. (a) (i) Explain the features of Microsoft Ward.
(6)
(ii) Draw a flowchart to find the largest of three numbers.
OR
(8)
(b) (i) Discuss the features of Microsoft Excel.
(8)
(ii) What is pseudo code ? Explain its guidelines and benefits.
14. (a) Explain all the arithmetic, relational, logical operators used in C language with (16)
necessary expressions as examples.
OR
(b) Write a program in C language for listing and counting all the numbers divisible (16)
by 3 and not by 5 from 1 to 100.
15. (a) Differentiate between the following concepts and give example for each :
(8)
(i) Structure and union
(8)
(ii) Call by reference and call by value.
OR
(4)
(b) (i) Discuss about functions in 'C'.
and use it
(ii) Write a 'C' function to calculate the factorial of a given number
in the main program to calculate the binomial coefficient of a given
number. Given binomial coefficient
(12)
n! (k! x (n - k) ! )
2 51644
PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor
1111111 11111111 1111111111111111111111 Reg. No. :
Qu estion P
a er
p Co ed : 52636
B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER 2017
First Semester
Civil Engineering
GE 2112 - FUNDAMENTALS OF COMPUTING AND COMPUTER
PROGRAMMING
(Common to all branches)
(Regulations 2008)
Time : Three Hours Maximum : 100 Marks
Answer ALL questions
PART -A (10x2=20 Marks)
PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor
52636 11111 II
111111 11111111 III 1111 1111 II 1
13. a) Draw the flowchart and write an algorithm to find the maximum value from
given values.
(OR)
b) Define flowchart and explain guidelines for drawing a flowchart with necessary
symbol.
15. a) List the types of functions and explain with suitable example.
(OR)
b) Explain call by value and call by reference in detail.
PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor
Reg. No. :
First Semester
Civil Engineering
(Regulations 2008)
*pv v+ 1;
u = *pv+1;
pu = &u;
Each character occupies 1 byte of memory. u is stored in F8C16 and v stored in
F8DIG. Give value assigned to &v, pv and * pv.
PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor
PART B - (5 x 16 = 80 marks)
. Or
(b) (i) Draw a block diagram of a computer and explain the functions of
various parts of computer. "(8)
Or
(b) Discuss internet applications like E-mail, search engines and chatting in
detail. (16)
Or
(b) (i) Explain the process of formatting text using MS -WORD text
processor. (8)
14. (a) (i) Write a menu driven program in C which has the following options.
(1) Factorial of a number
(2) Prime or not
(3) Odd or even
(4). Exit. (10)
(ii) Write a C program to get a five digit number as input through
keyboard and calculate the sum of its digits. (6)
Or
2 97147
PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor
41
to check whether a
(b) (i) Write a 'C' program using conditional operators
character entered is lower case alphabet, special symbol or upper
(8)
case character.
be calculated using
00 The approximate intelligence of a person can
the following formula i = 2 + (y + 0.6x) .
table of values of i, y and
Wkite a 'C' program 'which will produce a
for each value of y, x varies from
x where y varies form 1 to 6 and
(8)
5.5 to 12.5 in steps of 0.5.
calculation of area and
15. (a) (i) Write macro definitions with arguments for
these definitions
perimeter of a triangle, a square and a circle. Store
file in your program and call
in a file called "areaperi.h" include this for
and perimeter
the macro definitions for calculating area (10)
different squares, triangles and circles.
will generate a table
(ii) Write a C program using pointer notation that
containing the following three columns.
(6)
t a ebt sin c t a ebt cos Ct
Or
store
(b) (i) Write a program in C using file pointer and structures to
customer records in a bank having following entities.
old balance, new
Name, address, account number, account type,
allow insert, delete and
balance and payment. The program must (10)
updating customer records. 0
3
97147
PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor
Reg. No. :
11111
First Semester
Civil Engineering
(Regulation 2008)
2. Do AND operation.
101101 -
011011
PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor
PART B - (5 x 16 = 80 marks)
11. (a) (i) Describe the components of computer system in detail. (6)
(ii) How a source code is translate to executable code. Explain the three
language translators along with linker and loader module. Give its
pros and cons. (10)
Or
(b) Describe CPU and its interaction with other units. State the function of
various CPU register and its typical organization. (16)
(ii) Convert the 37.8125(.0) decimal number to its binary number. (3)
Or
(b) (i) Discuss in detail about arithmetic operations with signed numbers
using examples. (10)
(ii) Express +39 and -39 in Sign -Magnitude Form and 2's complement
Form. (6)
Or
14. (a) Name some of the basic services provided by the. internet. Explain how
each of these services helps the internet users. (16)
Or.
(b) Explain in detail about computer network basics and structure and its
types. (16)
2 97092
PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor
15. (a) (i) Write C program to find a Fibonacci serious for a given number. (8)
(8)
(ii) Write 'C program to manipulate addition of two matrices.
Or
3 97092
PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor
Reg. No.
1 11166
16-06
PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor
9. Correct the error, if any, otherwise give the output of the following 'C' program :
Main ( )
int a, b = 5, c = 2;
a=b++c;
print fi"a is (Yod", a);
PART -B (5 x 16 = 80 Marks)
11. ) Define computer ? Discuss in detail about block diagram of a computer with neat
diagram. (16)
OR
(b) What is binary digit ? Explain in detail about basic logic operations. (16)
12. (a) Convert the following numbers from the given base to the base indicated :
(i) Decimal 225.225 to binary and octal. (4)
PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor
(iii) What is the range of numbers that can be accommodated in a 16 bit register
when the binary numbers are represented in sign magnitude ?
Give the answer in equivalent decimal representation. (6)
13. (a) What are input devices and output devices ? Briefly explain some popular input
device and various types of output devices. (16)
OR
(b) (i) Describe the architecture of UNIX operating system. (6)
(ii) Specify the significant features of windows vista operating system. (6)
OR
(b) (i) Describe about the Cable Modern Connections with Diagram. (8)
15. (a) (i) Write a 'C' program for multiplying two matrices. (8)
(ii) Explain the concept, 'call by reference' with a programming example. (8)
OR
(b) (i) Write a 'C' program for customer purchase billing using the 'structure'
concept. (8)
3 11166
PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor
*X60639* Reg. No. :
12. a) Explain the steps of software developments with suitable examples. (16)
(OR)
b) i) Discuss the following internet terminologies.
1) Bandwidth
2) FTP
3) IP Address
4) Modem. (8)
ii) Write some of the internet applications. (8)
14. a) What are the categories of operators in ‘C’ ? Discuss any two operators with
suitable programs. (16)
(OR)
b) i) Write a ‘C’ program to generate Fibonacci series for a given number. (8)
ii) Write a ‘C’ program to find a factorial of a given number. (8)
–––––––––––––
*X67535* Reg. No. :
3. Define BCD.
11. a) Explain the components of a computer system with a neat block diagram. (16)
(OR)
b) With suitable examples explain the logic operations : AND, OR, NAND and
NOR. (16)
X 67535 *X67535*
12. a) Convert the following numbers from the given base to the base indicated :
i) Decimal 225.225 to binary and octal. (4)
ii) Octal 623.77 to binary, decimal and hexadecimal. (6)
iii) Hexadecimal 2AC5.D to decimal, octal and binary. (6)
(OR)
b) i) Simplify the following Boolean function
F (A, B, C, D) = ∑ (0, 1, 2, 5, 8, 9, 10) in (1) sum of products and (2) product of
sums. (4)
ii) Perform the arithmetic operations.
(+42) + (–13) and
(–42) – (–13) in binary using
1) sign 1’s complement representation.
2) Sign 2’s complement representation. (6)
iii) What is the range of numbers that can be accommodated in a 16 bit register
when the binary numbers are represented in sign magnitude ?
Give the answer in equivalent decimal representation. (6)
13. a) What are input devices and output devices ? Briefly explain some popular input
device and various types of output devices. (16)
(OR)
b) i)
ii) Brief the salient features of Windows VISTA OS. (4)
iii)
15. a) i) Write C program to find a Fibonacci serious for a given number. (8)
ii) Write C program to manipulate addition of two matrices. (8)
(OR)
b) i) What is different between structures and unions ? (3)
ii) Discuss in detail about looping (While, Do-while, for) concepts with suitable
example. (13)
–––––––––––––
Reg. No. :
First Semester
Civil Engineering
(Regulations 2008)
11. (a) Explain in detail about basic computer organization with a neat sketch.
(16)
Or
(b) What are the applications of computer? Discuss in detail about
classification of computers. (16)
12. (a) (i) Explain about the types of software. (10)
(ii) Write about UIRL. (6)
Or
(b) (i) Discuss the software development steps. (10)
(ii) Explain the common types of internet connections, (6)
13. (a) (i) What is pseudo code? Explain how it can be designed and its
benefits and limitations. (8)
(ii) Briefly discuss about word processor and spread sheets. (8)
Or
(b) Explain sequence logic, selection logic and iteration logic design structure
in pseudocode. (5 + 5 + 6 = 16)
14. (a) (i) What are the different operators available in C? Explain with
examples. (12)
(ii) Differentiate between signed and unsigned integer. (4)
Or
(b) (i) Write a C program that reads a character and displays only the
vowels using switch case structure. (8)
(ii) Write a C program that displays a pyramid structure using
numbers. (8)
15. (a) (i) Write a C program to sort the given set of numbers in ascending
order. (8)
(ii) Discuss about any eight built-in functions. (8)
Or
(b) (i) Write the syntax of structure declaration in ‘C’ program. Give an
example. (4)
(ii) Distinguish between structure and union. (4)
(iii) Write a C program to find the addition of two matrices. (8)
—————————
2 80637
Reg. No.
1
1 27655
PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor
PART -B (5 x 16 = Marks)
11. (a) (i) Elaborate the various generations of computers and their characteristics
and represent them in a tabular format. (8)
(ii) Write in detail about the basic organization of a computer.. (8)
OR
(b) Write an algorithm and flowchart to simulate the railway ticket booking process.
12. (a) (i) Describe the structure of a C program using "Calculator program"
example. (8)
(ii) Write short note on branching statements in C. (8)
OR
(b) Write in detail about the various looping statements with suitable examples.
14. (a) (i) What is the difference between call by value and call by reference ? What
are the problems associated with each ? Explain with suitable examples. (8)
(ii) What are the advantages of using recursion ? Demonstrate with examples. (8)
OR
(b) Write in detail about pointer arithmetic. Support your answer with appropriate
examples.
15. (a) (i) What is the need for structure data type ? Does structure bring additional
overhead to a program ? Justify. (10)
(ii) Write short note on structure declaration. (6)
OR
(b) What are the storage classes available in C ? Demonstrate the working of each
storage class.
2 27655
PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor
Reg. No.
5. What is an array ?
10-06 1 57408
PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor
PART -B (5 x 16 = 80 Marks)
Describe the basic computer organization with neat diagram. (10)
OR
Explain the various generations of computers. (8)
14. (a) (i) Write a C program to find the smallest and largest number from the given
10 numbers using functions. (10)
PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor
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. (16)
OR
(b) (i) Explain the various storage classes in C. (8)
3 57408
PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor
*X20657* Reg. No. :
11. a) Explain about algorithm, pseudocode and flow chart with an example of finding
the sum of ‘n’ number.
(OR)
b) Explain the basic organization of a computer with a neat diagram in detail.
X20657 *X20657*
12. a) Write about the need and types of looping statements in C language
and discuss with examples. (16)
(OR)
b) Write about the need and types of branching statements in C language and
discuss with examples. (16)
14. a) i) Write a C program to find the smallest and largest number from the
given 10 numbers using functions. (10)
ii) Explain the pass by reference with an example. (6)
(OR)
b) i) Write C program to find the factorial of a given number using recursion. (8)
ii) Write a C program to count the number of words in a string
using pointers. (8)
15. a) 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) Explain the various storage classes in C. (10)
ii) What is union ? Discuss with an example. (6)
–––––––––––––
1111111 11111111 III 1 11111 1 Reg. No. :
estio a er Co e :
B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER 2017
First Semester
Mechanical Engineering
GE 6151 - COMPUTER PROGRAMMING
(Common to Mechanical Engieering, (Sandwich), Aeronautical Engineering,
Agriculture Engineering, Automobile Engineering, Biomedical Engineering, Civil
Engineering, Computer Science and Engineering, Electrical and Electronics
Engineering, Electronics and Communication Engineering, Electronics and
Instrumentation Engineering, Environmental Engineering, Geoinformatics
Engineering, Industrial Engineering, Industrial Engineering and Management,
Instrumentation and Control Engineering, Manufacturing Engineering, Marine
Engineering, Materials Science and Engineering, Mechanical and Automation
Engineering, Mechatronics Engineering, Medical Electronics Engineering,
Metallurgical Engineering, Petrochemical Engineering, Production Engineering,
Robotics and Automation Engineering, Biotechnology, Chemical Engineering,
Chemical and Electrochemical Engineering, Fashion Technology, Food Technology,
Handloom and Textile Technology, Industrial Biotechnology, Information
Technology, Leather Technology, Petrochemical Technology, Petroleum
Engineering, Pharmaceutical Technology, Plastic Technology, Polymer Technology,
Rubber and Plastics Technology,Textile Chemistry, Textile Technology)
(Regulations 2013)
2. What is Flowchart ?
PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor
50648 -2- 11111111111 III 1111 I 1111111
9wPopileskircili
8. What are the advantages of using pointers in a program ?
tisititarrifila
9. Define_ in C++. Define 'Structure' of C language. Give an example.
L
-
! I '
-70-Iiimil:
and limitations.
.11-1141 diakumbirdidi
L. I
(10)
voriew. '
al mawnsoliniiiimilvslk
(OR) Atillnentril aiktrilniftuRd e.... ... i...!./ 11 1,...
b) i)....Give
, .i.,pseudocode algorithm and the
iii.porAiriugAorael ricuri no &limit a/:0Am. flowchart to print the Fibonacci - series of
torpb,!. ,viritaid_vt atittnuisi prinummigia imiankitterbeill Ism isrtionta(8)
n terms. 1
tabh111:001.-42114
ii) Write an algorithm and draw the flowchart to find the largest among three
1 , .
_Nitoraor
numbers.
. .
(8)
,frocitiri I gter1140101.2044T'T'l I
T' a)ViiiieWle,....114ettiajr"
12. Explain the different types of operators available in C with example. (16)
- Ea Mt
(OR)
If1u
.
b) yeifirtifaiti'Alec
;m I i decision making
i) With an example program explain the various statements II rm m 53M1 51
El 15
Li 1LJJai in
available if C.
.2 I(8)t
_I)
rtt-i sontsid'i
ii)
'' Explain switch case statement and 'for'"1121_^.4.
loop statement with suitable fr
example.
11.1:E121 I (8)
Otitguitil Odr.*001) 111/01
13. a) i) What is an array ? Write a C program to arrange the given 10 numbers in
ascending order tiliXiMtr
using oneHi Mod; fifirt! AITAR
dimensional array.Rim tstin Mit. '40 411 ,risoltri'a .1(8) t
PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor
t
11 111111111111111
I 111111 1111
-3- 50648
PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor
1:ELEEEEEEllsEEEEEEEE 311133
4111041
Ava8 gionagimatiketsibieibmptattwiraikeallue14101001
412kalgew
010) .
b WW1; a (d
artstakvi iinkorielifinwtwok, 'ammo 441 convie eCtaixrriii
**se ogattiviataviyr *Li wria tin mei avnakLi Num. cot imatiters 3 a lanIN ti
fframatail
PDF compression, OCR, web optimization using a watermarked evaluation copy of CVISION PDFCompressor