Professional Documents
Culture Documents
C Programming
Q.1. BCPL stands for
(a)Basic computer programming language
(c) basic common programming language
(b)basic combined programming language
(d)none of these
Q.3 This is used to show the start & end point of a function
(a) curly brackets (c)round brackets
(b)square brackets (d)none of these
Q.6 In C, one can specify their constants in octal or hexadecimal, or force them
to be treated as ______
(a)integer (c)double
(b)long integer (d)char
Q.13 This data type is used to declare variables that can have one of the value
enclosed with in braces
(a) enum (c)array
(b)struct (d)union
Q.17 A group of related data items that share a common name, is known as
(a)array (c)structure
(b)pointer (d)union
Q.22 This statement will convert a lower case letter into upper case letter
(a) x = x +’B’-‘b’ (c) x = x +’A’-‘a’
(b) x = x+ ’C’-‘c’ (d) all of these
Q.30 In switch case, one variable is tested for all condition. This variable should
be of ---------type
(a) integral (c) integer
(b)float (d) array
Q.31 What will be the output of the following program the input is 2
Switch(num)
{
case 0: printf (“0”);
case 1: printf (“1”);
case 2: printf (“2”);
case 3: printf (“3”);
default: printf (“*”);
}
(a)23* (c)2
(b)2 3 (d)0123*
Q.39 If declared size of the string is 4, & the entered string is “manipal” ,then its
printed value will be
(a) manipal (c) manip
(b) mani (d)error
Q.41 To get the address of a variable & to store the address of that variable,
___and ____is used.
(a)&,pointer (c)pointer, &
(b)&,** (d)&&,*
Q.48 This function appends a source string to the end of a destination string
(a) strcat (c)strncat
(b) strcpy (d)strncpy
Q.49 In the strcmp function, if the first string is smaller than the second string,
then it return a number
(a)greater then zero (c)less than zero
(b)equal to zero (d)not equal to zero
Q.60 ---------- puts formatted data into a string which must have sufficient space
allocated to hold it
(a) printf (c) sprintf
(b) fprintf (d) ssprintf
(iii) *(*(x+1)+2)
(a)3 (c) 5
(b)4 (d) 6
(iv) *(*x+3)
a) 6 (c) 4
(b) 5 (d) 3
(v) *(*(x+0))
(a) 1 (c) 5
(b) 3 (d) 0