Вы находитесь на странице: 1из 12

S.

no 1 2 3 4 5 6 7 8 9 10 11

Question Which of the following is invalid? The operator + in a+=4 means Which of the following is an example of compounded assignment statement? Which escape character can be used to beep from speaker in c ? The size of a String variable is The operator & is used for What will be the maximum size of a float variable? The operator / can be applied to The equality operator is represented by Which of the following operator has the highest precedence?
1. #include <stdio.h>

void main()
{ int x = 97; char y = x; printf("%c\n", y); }

12 The number of tokens in the following C statement. printf("i = %d, &i = %x", i, &i); 13 Which of the following statements is incorrect ? 14 If y is of integer type then the expression 3 * ( y - 8 ) / 9 and ( y - 8 )/ 9 * 3 15 What is (void*)0? 16 In which header file is the NULL macro defined? 17 What is the output of the following 'C' program? main() { int a[5]={2,3}; printf("\n%d%d%d",a[2],a[3],a[4]); } 18 Identify the invalid pointer arithmetic

19 Consider the declaration: static struct { unsigned a:5; unsigned b:5; unsigned c:5; unsigned d:5%: }v=(1,2,3,4); v occupies 20 If a structure is defined as struct TAB{

short a; int b; long c; }TABLE[10]; the the total memory requirement for TABLE is 21 The function fopen("filename","r")returns

22 pick out the error in the program #include<stdio.h>


int main() { int a[] = {10, 20, 30, 40, 50}; int j; for(j=0; j<5; j++) { printf("%d\n", a); a++; } return 0; }

23 What will be the output of the program ?


#include<stdio.h> int main() { static char *s[] = {"black", "white", "pink", "violet"}; char **ptr[] = {s+3, s+2, s+1, s}, ***p; p = ptr; ++p; printf("%s", **p+1); return 0; }

24 What will be the output of the program ?


#include<stdio.h> int main() { int i=3, *j, k; j = &i; printf("%d\n", i**j*i+*j); return 0; }

25 A stream is a sequence of 26 What will be the output of the following statement? printf( 3 + "goodbye");

27 The value of j at the end of the execution of the following C program. int incr (int i) { static int count = 0; count=count+I; return(count); } main() {int I,j; for(i=0;i=4;i++) j=incr(i); } 28 The smallest element of an array's index is called its 29 What is the maximun number of dimensions an array in C may have?

30 If x is an array of interger, then the value of &x[i] is same as 31 What does the following program print? #include<stdio.h> void f(int *p, int *q) { p = q; *p = 2; } int i = 0, j = 1; int main() { f(&i, &j); printf("%d %d \n", i, j); getchar(); return 0; } 32 The number of tokens in the following C statement. printf("i = %d, &i = %x", i, &i); 33 Size of the array need not be specified, when 34 A one dimensional array A has indices 1....75.Each element is a string and takes up three memory words. The array is stored starting at location 1120 decimal.The starting address of A[49] is 35 Identify the invalid pointer arithmetic

36 A Structure

37 Array subscripts in C always start at 38 Maximum number of elements in the array declaration int a[5][8] is 39 Pointers are of 40 A pointer to a pointer in a form of 41 C allows arrays of greater than two dimensions, who will determined this 42 When the main function is called, it is called with the arguments 43 In C, a Union is 44 The continue command cannot be used with 45 A Link is 46 The conversion characters for data input means that the data item is 47 The printf() function retunes which value when an error occurs? 48 Header files in C contain

50 The type cast operator is 51 Explicit type conversion is known as 52 What will be the output of the expression 11 ^ 5? 53

Option 1 '' a=a+4 a=5 \a 1 byte Bitwise AND 1 byte integer values := * a

Option 2 a+4=a a +=5 \b 2 bytes Bitwise OR 2 bytes float values .EQ ==' b

Option 3 a a=4 a=b=c \m 16 bytes Logical AND 4 bytes double values = =>' 97

3 C provides no input-output features must yield the same value Representation of NULL pointer stdio.h Garbage values C provides no file access features must yield different value representation of void pointer stddef.h Error

26 Provides no features to manipulate composite may or may not yield the same value error stdio.h and stddef.h 322

10

Addition of float value to a pointer 4 bytes

comparison of pointers that do not point to the element of the same array 2 bytes

subtracting an integer from a pointer 1 byte

14

140

40

Nothing

Error: Declaration syntax

A value 0 or 1 depending on whether the file could be opened or not Error:Expression syntax

A pointer to FILE filename,if it exits Lvalue required

ink

ack

ite

30

27

integers goodbye

File names odbye

Bytes dbye

10

Lower bound Two

Upper bound Eight

Range Twenty

&x[i-1] + sizeof (int) 22

x + sizeof (int) * i 21

x+i 01

3 Initialization is a part of definition 1167 It is a declaratrion

26 It is a formal parameter 1164

10

1264

Addition of float value to a pointer

can be read as a single

Comparision of pointers that do not point to the element of the same array cannot be read as a single

subtracting an integer from a pointer

can be displayed as a

entity -1 28 interger data type multiple indirection programmer argc memory location for a compiler An unsigned decimal interger Positive value Compiler commands

entity 1 32 character data type a chain of pointers compiler argv memory store switch an active debugger A short integer Zero Library funcitons

single entity 0 35 unsigned integer data type both a and b parameter None of these memory screen do a C interpreter A hexadecimal integer Negative value Header information of C programs //' Disjunction 6 11

(type) Casting 5

cast() conversion

Option 4 abc a=4+4 a=b \n none Logical OR 8 bytes All of these ==' +' runtime error

Correct Answer abc' a=a+4 a +=5 \a 2 bytes Bitwise AND 4 bytes All of these ==' a

21 all of these none of these none of these math.h 000 all of these may or may not yeld the same value Representation of NULL pointer stdio.h and stddef.h 000

10

assigning the value 0 to a pointer variable none of these

assigning the value 0 to the pointer variable 4 bytes

32

140

A pointer to a new file after creating it Rvalue required

A value 0 or 1 depending on whether the file could be opened or not Lvalue required

let

ink

30

bits bye

Bytes dbye

Extaction Theoritically no limt. The only practical limits are memory size and compilers none of these 02

Lower bound Theoritically no limt. The only practical limits are memory size and compilers &x[i-1] + sizeof (int) 02

21 All of these 1169 All of these

10

1264

Assigning the value 0 to a pointer variale

Addition of float value to a pointer

has member variables

a&d

that cannot be read individually value provided by user 40 none of these None of these None of these both a & b None of these while an analyzing tool in C A string followed by while space None of these Operators for files integer data type both a & b

both a & b memory store switch

Negative value Library functons

"" Seperation None of these

(type) Casting None of these

Вам также может понравиться