16bt10501-Programming in C

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

CODE No.

:16BT10501 SVEC16

SREE VIDYANIKETHAN ENGINEERING COLLEGE


(An Autonomous Institution, Affiliated to JNTUA, Anantapur)
I B.Tech I Semester (SVEC16) Supplementary Examinations June - 2017
PROGRAMMING IN C
[ Civil Engineering, Electrical and Electronics Engineering, Mechanical Engineering,
Electronics and Communication Engineering, Computer Science and Engineering,
Electronics and Instrumentation Engineering, Information Technology,
Computer Science and Systems Engineering ]
Time: 3 hours Max. Marks: 70
Answer One Question from each Unit
All questions carry equal marks

1. Analyze Arithmetic, Logical, Bitwise and Conditional operators with example 14 Marks
programs.
(OR)
2. a) Demonstrate various data types in 'C' with their syntax and examples. 7 Marks
b) Define Token. List various 'C' tokens with examples. 7 Marks

3. a) What is the purpose of the while statement? When is the logical expression 9 Marks
evaluated? What is the minimum number of times that a while loop can be
executed?
b) A ‘C’ program contains the following statements: 5 Marks
#include <stdio.h>
int i, j , k;
Write an appropriate scanf() function to enter numerical values for i, j and k,
assuming
i) The values for i,j and k will be decimal integers.
ii) The value for i will be a decimal integer, j an octal integer and k a
hexadecimal integer.
iii) The values for i and j will be hexadecimal integers and k will be an octal
integer.
(OR)
4. Write a ‘C’ program that prints largest among three numbers. 14 Marks

5. a) How Recursion is implemented? Describe with an example. 7 Marks


b) Write a 'C' program that illustrates Scope rules in blocks. 7 Marks
(OR)
6. a) Using recursive functions implement a program to print all prime numbers 7 Marks
between given two positive numbers N,M where N<M. What is a recursion?
Write a recursive function to find N.
b) Write a program to calculate the sum of the elements in two tables of integers. 7 Marks

7. a) Define String. Explain String input and output functions with syntax. 7 Marks
b) Write a 'C' program to check whether the given string is Palindrome or not. 7 Marks
(OR)

1
8. a) Develop a program to read a long text and then find the number of characters, 7 Marks
number of vowels, number of consonants, number of digits, number of words,
number of white spaces and number of special symbols.
b) Explain the concept of passing pointers to a function and demonstrate with an 7 Marks
example program.

9. a) Explain basic file operations with its syntax. 7 Marks


b) Write a 'C' program to illustrate opening and closing of files. 7 Marks
(OR)
10. a) Demonstrate how to work with binary files. 7 Marks
b) Write a 'C' program to compare two files. 7 Marks


You might also like