[go: up one dir, main page]

0% found this document useful (0 votes)
79 views1 page

UTA003

This document appears to be an examination paper for the course "Computer Programming" at Thapar Institute of Engineering & Technology, Patiala, Department of Computer Science & Engineering. It contains 9 questions testing various concepts in C programming language like data types, operators, string manipulation functions, structures, unions, call by value/address, pointers, arrays, structures, pointers to functions, loops, and I/O functions. The exam is for 3 hours with a maximum of 100 marks.

Uploaded by

Parshav Singla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views1 page

UTA003

This document appears to be an examination paper for the course "Computer Programming" at Thapar Institute of Engineering & Technology, Patiala, Department of Computer Science & Engineering. It contains 9 questions testing various concepts in C programming language like data types, operators, string manipulation functions, structures, unions, call by value/address, pointers, arrays, structures, pointers to functions, loops, and I/O functions. The exam is for 3 hours with a maximum of 100 marks.

Uploaded by

Parshav Singla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Roll Number:

Thapar institute of Engineering & Technology, Patiala


Computer Science & Engineering Department
AUXILIARY EXAMINATION
Course Code: UTA003
Course Name: Computer Programming_
MONDAY, 5.30 8.30 PM
July 30, 2018
Name Of Faculty: Rajkumar Tekchandani
Time: 3 Hours, M. Marks: 100

Note: Attempt all questions. Write to the point.


Assume missing data, !luny, suitably.
(10)
List various data types in C language along with their range. Write the output of following C
Q.1
code.
a) #include<stdio.h>void main(){ b) Itinclude<stdio.h>
void main()(
int i:-1,k,num. 30;
int a:- 300,b::10,c-20;
clrscrO;
switch(i){ clrscrQ;
if (!(a>::400))
case 1:
k-:( num>5?(num< 10?100:200):500); {h 300;
c -200;
printf("o/od \n",k);
printf("b::%d c -,%d",b,c);}
break;
else
case 2:
printf("university\ n"); (printf("hello");}
getch();}
break
default:
printf("invalid option"); )
getch();)
(10)
List various types of operators available in C language and also give their precedence and
Q.2
associativity, if any?
(10)
functions with an example along with its
Q.3 Explain the following string manipulation
prototype:
ii)strcat iii)strcmp iv)strrev
i) strlen
(10)
Q.4 Differentiate between structure and union with an example?
(10)
What is message passing in functions? Explain call by value and call by address with the
Q.S
help of an example?
(10)
Explain the relation between pointers and arrays? Write the output of following code
Q.6
snippet if the starting address of the array is 2000?
#include<stdio.h>
void main0(
int i,*j;
int m151, :(55,65,75,85,95);
clrscr();
j :&m10];
for(i 0;i<5;i-'- -)
(printf("%u \ t",&m I i I );
printf("oM\ n".1);

getchO;}
Q.7 Explain array of structures with an example?
Explain pointers to functions with an example?
Q.8
Q.9 Differentiate between the following with an example:
While and do-while loop.
(a)
(b) Break and continue statement.
(c) Enumerations and typedef.
(d) tread() and (write().

You might also like