Exam Details
Subject | advanced computer programming | |
Paper | ||
Exam / Course | diploma engineering | |
Department | ||
Organization | Gujarat Technological University | |
Position | ||
Exam Date | January, 2019 | |
City, State | gujarat, ahmedabad |
Question Paper
1/11
Seat No.: Enrolment
GUJARAT TECHNOLOGICAL UNIVERSITY
DIPLOMA ENGINEERING- C to D Bridge Course Examination WINTER 2018
Subject Code: C320702 Date: 09-01-2019
Subject Name: Advanced Computer Programming
Time: 10:30 AM TO 12:00 PM Total Marks: 70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Each question is of 1 mark.
4. Use of only simple calculator is permitted. (Scientific/Higher Version not allowed).
5. English version is authentic.
No.
Question Text and Option.
1.
For array of size which is considered as the last array element?
A.
0
B.
n
C.
n-1
D.
None of the above
array size n
A.
0
B.
n
C.
n-1
D.
2.
From where does Array index start from?
A.
B.
0
C.
1
D.
None of the above
Array
A.
B.
0
C.
1
D.
3.
An array can hold
A.
Constant Data
B.
Data of similar data type
C.
Data of different data type
D.
None of the above
Array
A.
Constant Data
B.
C.
D.
4.
What happens when you assign a value to an array element whose subscript exceeds the array size?
A.
Element will be set to 0
B.
Complier would report an error
C.
Program crashes
D.
Array size would automatically grow
Array value size
A. Element 0
B. Compiler
C.
D.
Array size
5.
Array elements are always stored in
A.
Random Sequential order
B.
Random order
C.
Sequential order
D.
None of the above
Array elements ….. store
A.
Random Sequential order
B.
Random order
C.
Sequential order
D.
6.
What will be the value of when array is initialized as int
A.
0
B.
1
C.
2
D.
3
A.
0
B.
1
2/11
C.
2
D.
3
7.
If array is declared as int how many elements can it store?
A.
5
B.
10
C.
20
D.
25
array int array element store
A.
5
B.
10
C.
20
D.
25
8.
Which of the following will be used to access 6th element stored in array?
A.
Array[6]
B.
Array[5]
C.
Array
D.
Array
array 6th element
A.
Array[6]
B.
Array[5]
C.
Array
D.
Array
9.
What is the maximum number of dimension an array can have in
A.
3
B.
10
C.
20
D.
Theoretically no limit
C array maximum dimension
A.
3
B.
10
C.
20
D.
10.
String in C ends with
A.
B.
C.
D.
C string .......
A.
B.
C.
D.
11.
Which of the following is true for char c
A.
printf
B.
C.
D.
char c
A.
printf
B.
C.
D.
12.
Which of the following is not a string function?
A.
strcat
B.
strlen
C.
strcpy
D.
strjoin
string
A.
strcat
B.
strlen
C.
strcpy
D.
strjoin
13.
Float data type occupies bytes.
A.
2
B.
4
C.
0
D.
1
Float ……. bytes
A.
2
B.
4
C.
0
D.
1
14.
If two strings are identical, strcmp function returns
A.
B.
1
C.
0
D.
Yes
strings strcmp
A.
B.
1
C.
0
D.
Yes
15.
Size of an array need not be specified when
A.
Initialization is part of definition
B.
It is declaration
C.
It is a formal parameter
D.
All of the above
Array size
A.
Initialization is part of definition
B.
It is declaration
C.
It is a formal parameter
D.
All of the above
3/11
16.
Which of the following operator is used declare pointer variable?
A.
B.
C.
D.
A.
B.
C.
D.
17.
What is the value of *ptr for following code?
int
int *ptr
A.
10
B.
Address of variable x
C.
Both A and B
D.
None of A and B
*ptr int x 10; int *ptr
A.
10
B.
Address of variable x
C.
Both A and B
D.
None of A and B
18.
Pointer is a special kind of variable which is used to store?
A.
Address of the variable
B.
Data type of the variable
C.
Value of the variable
D.
Variable name of the variable
A.
B.
C.
D.
19.
Which of the following is proper declaration of a pointer?
A.
int
B.
pointer
C.
int
D.
int
pointer declaration
A.
int
B.
pointer
C.
int
D.
int
20.
Which of the following is the proper keyword to allocate memory?
A.
create
B.
new
C.
malloc
D.
value
allocate
A.
create
B.
new
C.
malloc
D.
value
21.
What is a wild pointer?
A.
Pointer which has no value.
B.
Pointer which is wild in nature.
C.
Pointer which is not initialized.
D.
There is nothing like wild pointer.
A.
B.
C.
D.
22.
Which data type is there for address stored in the pointer?
A.
char
B.
float
C.
integer
D.
array
A.
char
B.
float
C.
integer
D.
array
23.
Any C program
A.
Contains at least one function
B.
Need not contain any function
C.
Needs input data
D.
None of the above
C
A.
B.
C.
D.
Which header file is to be included for using string functions?
A.
str.h
B.
string.h
4/11
C.
stdio.h
D.
None of the above
string functions
A.
str.h
B.
string.h
C.
stdio.h
D.
25.
If variable is pointed to a structure, which operator is used to access data members of the structure through the pointer variable?
A.
. (dot operator)
B.
operator
C.
D.
structure point structure data members
A.
. (dot operator)
B.
operator
C.
D.
26.
What is the value of c if
A.
B.
5
C.
10
D.
-10
c
A.
B.
5
C.
10
D.
-10
27.
int here ptr is
A.
Pointer
B.
Pointer to Pointer
C.
Both
D.
None
int ptr
A.
Pointer
B.
Pointer to Pointer
C.
Both
D.
None
28.
Which function/s is/are related to dynamic memory allocation?
A.
malloc()
B.
calloc()
C.
realloc()
D.
All of the above
A.
malloc()
B.
calloc()
C.
realloc()
D.
All of the above
29.
Which header file is to be included for using concept of dynamic memory allocation?
A.
stdio.h
B.
alloc.h
C.
conio.h
D.
All of the above
A.
stdio.h
B.
alloc.h
C.
conio.h
D.
All of the above
30.
What is the size of generic pointer in
A.
0
B.
1
C.
2
D.
4
A.
0
B.
1
C.
2
D.
4
31.
is called as in pointer concept.
A.
Conditional operator
B.
Logical operator
C.
Address operator
D.
None of the above
A.
Conditional operator
B.
Logical operator
C.
Address operator
D.
None of the above
32.
What will be the value of
5/11
int
j
A.
3
B.
9
C.
27
D.
30
K
int
j
A.
3
B.
9
C.
27
D.
30
33.
What is a function?
A.
A block of statements that perform some specific task
B.
It is a fundamental modular unit which is designed to perform a specific task
C.
A block of code that performs a specific task which has a name and is reusable.
D.
All of the above
A.
B.
C.
D.
All of the above
34.
strupr(s) is used to
A.
Convert string into lower case
B.
Convert string into upper case
C.
Convert string into title case
D.
Convert string into proper case
strupr(s)
A.
String
B.
String
C.
String
D.
String
35.
Which function is used for converting string into lower case
A.
strlower
B.
strproper
C.
strupr
D.
strlwr
string
A.
strlower
B.
strproper
C.
strupr
D.
strlwr
36.
is called as recursive function.
A.
When a function calls itself
B.
When function calls function outside of main()
C.
When function calls nested function
D.
None of the above
…………
A.
B.
C.
D.
None of the above
37.
Which of the following calculates the square of in
A.
sqr(x)
B.
C.
sqrt(x)
D.
C square
A.
sqr(x)
B.
C.
sqrt(x)
D.
6/11
38.
Keyword used to transfer control from a function back to the calling function is
A.
return
B.
goto
C.
go back
D.
switch
A.
return
B.
goto
C.
go back
D.
switch
39.
The default parameter passing mechanism in a function is
A.
Call by value
B.
Call by reference
C.
Call by value result
D.
None of these
A.
Call by value
B.
Call by reference
C.
Call by value result
D.
None of these
40.
The meaning of keyword VOID before function name means
A.
Function should return any value
B.
No arguments are passed
C.
Function should not return any value
D.
None of the above
keyword VOID
A.
value
B.
C.
value
D.
41.
Every function in C is followed by
A.
Parameters
B.
Parenthesis
C.
Square Braces
D.
None of the above
C
A.
Parameters
B.
Parenthesis
C.
Square Braces
D.
42.
Which functions are used for single character input/output?
A.
getchar() putchar()
B.
scanf() putchar()
C.
getchar() printf()
D.
scanf() printf()
single character input/output
A.
getchar() putchar()
B.
scanf() putchar()
C.
getchar() printf()
D.
scanf() printf()
43.
The value obtained in the function is given back to main by using keyword?
A.
static
B.
New
C.
Dynamic
D.
return
main keyword
A.
static
B.
New
C.
Dynamic
D.
return
44.
Recursion is a process in which a function calls
A.
main() function
B.
itself
C.
another function
D.
none of the above
Recursion
A.
main() function
B.
C. function
D.
45.
The function scanf() returns
A.
0
B.
ASCII value of the input read
C.
The number of successful read input values
D.
The actual values read for each argument
scanf()
A.
0
B.
ASCII value of the input read
C.
The number of successful read input values
D.
The actual values read for each argument
7/11
46.
C Preprocessor takes care of
A.
Conditional compilation
B.
Include files
C.
Macros
D.
All of the above
C
A.
Conditional compilation
B.
Include files
C.
Macros
D.
All of the above
47.
A Preprocessor command
A.
Need not start on new line
B.
Has as first character
C.
Need not start on the first column
D.
All of the above
command
A.
B.
C.
D.
All of the above
48.
Which of the following are correct pre-processor directives in
1.#undef
2.#if
3.#elif
4.#error
A.
1,2
B.
C.
D.
2,4
1.#undef
2.#if
3.#elif 4.#error
A.
1,2
B.
C.
D.
2,4
49.
In which stage the execution of code #include<conio.h> gets the contents of the file conio.h?
A.
During execution
B.
During linking
C.
During editing
D.
During preprocessing
stage #include<conio.h> content
A.
Execution
B.
Linking
C.
Editing
D.
Pre-processing
50.
What will be the output of the following program?
#include<stdio.h>
#define product a*b
void main()
int
printf("%d",
A.
3
B.
4
C.
12
D.
24
#include<stdio.h>
#define product a*b
void main()
int
printf("%d",
A.
3
B.
4
8/11
C.
12
D.
24
51.
Which of the following is a collection of different data types?
A.
String
B.
Array
C.
Files
D.
Structure
data types
A.
String
B.
Array
C.
Files
D.
Structure
52.
How many bytes are occupied by the following union?
union student
int
char name
A.
50
B.
51
C.
52
D.
54
union bytes
union student
int
char name
A.
50
B.
51
C.
52
D.
54
53.
How many bytes are occupied by the following structure?
struct employee
int emp_id;
double ph_no;
char name
A.
100
B.
106
C.
108
D.
110
structure bytes
struct employee
int emp_id;
double ph_no;
char name
A.
100
B.
106
C.
108
D.
110
54.
For accessing a structure elements using a pointer, you must use
A.
Pointer Operator Operator)
B.
Dot Operator Operator)
C.
Pointer Operator Operator)
D.
Arrow Operator
pointer structure elements
A.
Pointer Operator Operator)
B.
Dot Operator Operator)
C.
Pointer Operator Operator)
D.
Arrow Operator
55.
Most appropriate statement to describe Union is
A.
Union are like Structures
B.
Union contain members of different data types which share the same storage area in memory
C.
Union is less frequently used in a program
D.
Union are used for set operations
Union .....
9/11
A.
Union structure
B.
Union
C. union
D.
Union
56.
Which operator is used for connecting a structure name to its member name?
A.
operator
B.
operator
C.
. operator
D.
All of the above
sturcture name member
A.
operator
B.
operator
C.
. operator
D.
All of the above
57.
Which of the following have similar syntax?
A.
Structure and union
B.
Union and array
C.
Structure and pointer
D.
Array and pointer
A.
Structure and union
B.
Union and array
C.
Structure and pointer
D.
Array and pointer
58.
Which is the type of file?
A.
Text
B.
Binary
C.
Both
D.
None
A.
Text
B.
Binary
C.
Both
D.
None
59.
feof() indicates
A.
Error in a file
B.
End of file
C.
Move to the beginning of file
D.
Move to desired position in file
feof()
A.
file error
B.
C.
move
D.
move
60.
The contents of an existing file will be lost if it is opened in
A.
mode
B.
mode
C.
mode
D.
None of the above
....
A.
mode
B.
mode
C.
mode
D.
61.
The process of accessing data stored in a tape is similar to manipulating data on a
A.
Queue
B.
Stack
C.
List
D.
None of the above
A.
Queue
B.
Stack
C.
List
D.
62.
The function fopen ("filename", return
A.
Nothing
B.
Value 0 or 1 depending whether file can be opened or not
C.
A pointer to FILE filename, if it exists
D.
A pointer to a new file after creating it
fopen ("filename",
A.
Nothing
B.
Value 0 or 1 depending whether file can be opened or not
C.
A pointer to FILE filename, if it exists
D.
A pointer to a new file after creating it
63.
In the given statement fprintf(fptr,
The variable fptr is a/an
10/11
A.
Integer variable
B.
Arbitrarily assigned value
C.
Pointer to a file
D.
Special kind of variable called file
fprintf (fptr, fptr .......
A.
Integer variable
B.
assigned value
C.
Pointer to a file
D.
Special kind of variable called file
64.
((fpt=fopen("sample.txt","w")) NULL) would be true if
A. The file sample does not exist while fopen is being executed
B. The file sample could not be created for writing
C. fpt is declared as a FILE pointer
D. The file sample is read only
fopen ("sample.txt", nULL)
A.
sample
B.
sample write
C.
fpt FILE
D.
sample read
65.
If a file is opened in mode then
A.
Reading is possible
B.
Writing is possible
C.
After writing, reading is possible without closing and reopening
D.
All of the above
W
A.
Reading
B.
Writing
C.
write read
D.
66.
The fseek function
A.
Needs 3 arguments
B.
Makes the rewind function unnecessary
C.
Is meant for checking whether a given file exists or not.
D.
Both and
fseek
A.
B.
rewind
C.
D.
67.
fputs() returns
A.
EOF if an error occurs
B.
Non-negative if no error
C.
Both and
D.
None of the above
fputs()
A. EOF error
B.
error
C.
D.
68.
The value of EOF is
A.
B.
0
C.
1
D.
10
EOF
A.
B.
0
C.
1
D.
10
69.
getc() is used to
A.
Read a string from file
B.
Read a character from file
C.
Read integer from file
D.
Read anything from file
getc()
11/11
A.
string read
B.
character read
C.
integer read
D.
read
70.
How can we modify an already existing file?
A.
Using Write Mode
B.
Using Read Mode
C.
Using Append Mode
D.
None of the above
A.
Write mode
B.
Read mode
C.
Append mode
D.
Seat No.: Enrolment
GUJARAT TECHNOLOGICAL UNIVERSITY
DIPLOMA ENGINEERING- C to D Bridge Course Examination WINTER 2018
Subject Code: C320702 Date: 09-01-2019
Subject Name: Advanced Computer Programming
Time: 10:30 AM TO 12:00 PM Total Marks: 70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Each question is of 1 mark.
4. Use of only simple calculator is permitted. (Scientific/Higher Version not allowed).
5. English version is authentic.
No.
Question Text and Option.
1.
For array of size which is considered as the last array element?
A.
0
B.
n
C.
n-1
D.
None of the above
array size n
A.
0
B.
n
C.
n-1
D.
2.
From where does Array index start from?
A.
B.
0
C.
1
D.
None of the above
Array
A.
B.
0
C.
1
D.
3.
An array can hold
A.
Constant Data
B.
Data of similar data type
C.
Data of different data type
D.
None of the above
Array
A.
Constant Data
B.
C.
D.
4.
What happens when you assign a value to an array element whose subscript exceeds the array size?
A.
Element will be set to 0
B.
Complier would report an error
C.
Program crashes
D.
Array size would automatically grow
Array value size
A. Element 0
B. Compiler
C.
D.
Array size
5.
Array elements are always stored in
A.
Random Sequential order
B.
Random order
C.
Sequential order
D.
None of the above
Array elements ….. store
A.
Random Sequential order
B.
Random order
C.
Sequential order
D.
6.
What will be the value of when array is initialized as int
A.
0
B.
1
C.
2
D.
3
A.
0
B.
1
2/11
C.
2
D.
3
7.
If array is declared as int how many elements can it store?
A.
5
B.
10
C.
20
D.
25
array int array element store
A.
5
B.
10
C.
20
D.
25
8.
Which of the following will be used to access 6th element stored in array?
A.
Array[6]
B.
Array[5]
C.
Array
D.
Array
array 6th element
A.
Array[6]
B.
Array[5]
C.
Array
D.
Array
9.
What is the maximum number of dimension an array can have in
A.
3
B.
10
C.
20
D.
Theoretically no limit
C array maximum dimension
A.
3
B.
10
C.
20
D.
10.
String in C ends with
A.
B.
C.
D.
C string .......
A.
B.
C.
D.
11.
Which of the following is true for char c
A.
printf
B.
C.
D.
char c
A.
printf
B.
C.
D.
12.
Which of the following is not a string function?
A.
strcat
B.
strlen
C.
strcpy
D.
strjoin
string
A.
strcat
B.
strlen
C.
strcpy
D.
strjoin
13.
Float data type occupies bytes.
A.
2
B.
4
C.
0
D.
1
Float ……. bytes
A.
2
B.
4
C.
0
D.
1
14.
If two strings are identical, strcmp function returns
A.
B.
1
C.
0
D.
Yes
strings strcmp
A.
B.
1
C.
0
D.
Yes
15.
Size of an array need not be specified when
A.
Initialization is part of definition
B.
It is declaration
C.
It is a formal parameter
D.
All of the above
Array size
A.
Initialization is part of definition
B.
It is declaration
C.
It is a formal parameter
D.
All of the above
3/11
16.
Which of the following operator is used declare pointer variable?
A.
B.
C.
D.
A.
B.
C.
D.
17.
What is the value of *ptr for following code?
int
int *ptr
A.
10
B.
Address of variable x
C.
Both A and B
D.
None of A and B
*ptr int x 10; int *ptr
A.
10
B.
Address of variable x
C.
Both A and B
D.
None of A and B
18.
Pointer is a special kind of variable which is used to store?
A.
Address of the variable
B.
Data type of the variable
C.
Value of the variable
D.
Variable name of the variable
A.
B.
C.
D.
19.
Which of the following is proper declaration of a pointer?
A.
int
B.
pointer
C.
int
D.
int
pointer declaration
A.
int
B.
pointer
C.
int
D.
int
20.
Which of the following is the proper keyword to allocate memory?
A.
create
B.
new
C.
malloc
D.
value
allocate
A.
create
B.
new
C.
malloc
D.
value
21.
What is a wild pointer?
A.
Pointer which has no value.
B.
Pointer which is wild in nature.
C.
Pointer which is not initialized.
D.
There is nothing like wild pointer.
A.
B.
C.
D.
22.
Which data type is there for address stored in the pointer?
A.
char
B.
float
C.
integer
D.
array
A.
char
B.
float
C.
integer
D.
array
23.
Any C program
A.
Contains at least one function
B.
Need not contain any function
C.
Needs input data
D.
None of the above
C
A.
B.
C.
D.
Which header file is to be included for using string functions?
A.
str.h
B.
string.h
4/11
C.
stdio.h
D.
None of the above
string functions
A.
str.h
B.
string.h
C.
stdio.h
D.
25.
If variable is pointed to a structure, which operator is used to access data members of the structure through the pointer variable?
A.
. (dot operator)
B.
operator
C.
D.
structure point structure data members
A.
. (dot operator)
B.
operator
C.
D.
26.
What is the value of c if
A.
B.
5
C.
10
D.
-10
c
A.
B.
5
C.
10
D.
-10
27.
int here ptr is
A.
Pointer
B.
Pointer to Pointer
C.
Both
D.
None
int ptr
A.
Pointer
B.
Pointer to Pointer
C.
Both
D.
None
28.
Which function/s is/are related to dynamic memory allocation?
A.
malloc()
B.
calloc()
C.
realloc()
D.
All of the above
A.
malloc()
B.
calloc()
C.
realloc()
D.
All of the above
29.
Which header file is to be included for using concept of dynamic memory allocation?
A.
stdio.h
B.
alloc.h
C.
conio.h
D.
All of the above
A.
stdio.h
B.
alloc.h
C.
conio.h
D.
All of the above
30.
What is the size of generic pointer in
A.
0
B.
1
C.
2
D.
4
A.
0
B.
1
C.
2
D.
4
31.
is called as in pointer concept.
A.
Conditional operator
B.
Logical operator
C.
Address operator
D.
None of the above
A.
Conditional operator
B.
Logical operator
C.
Address operator
D.
None of the above
32.
What will be the value of
5/11
int
j
A.
3
B.
9
C.
27
D.
30
K
int
j
A.
3
B.
9
C.
27
D.
30
33.
What is a function?
A.
A block of statements that perform some specific task
B.
It is a fundamental modular unit which is designed to perform a specific task
C.
A block of code that performs a specific task which has a name and is reusable.
D.
All of the above
A.
B.
C.
D.
All of the above
34.
strupr(s) is used to
A.
Convert string into lower case
B.
Convert string into upper case
C.
Convert string into title case
D.
Convert string into proper case
strupr(s)
A.
String
B.
String
C.
String
D.
String
35.
Which function is used for converting string into lower case
A.
strlower
B.
strproper
C.
strupr
D.
strlwr
string
A.
strlower
B.
strproper
C.
strupr
D.
strlwr
36.
is called as recursive function.
A.
When a function calls itself
B.
When function calls function outside of main()
C.
When function calls nested function
D.
None of the above
…………
A.
B.
C.
D.
None of the above
37.
Which of the following calculates the square of in
A.
sqr(x)
B.
C.
sqrt(x)
D.
C square
A.
sqr(x)
B.
C.
sqrt(x)
D.
6/11
38.
Keyword used to transfer control from a function back to the calling function is
A.
return
B.
goto
C.
go back
D.
switch
A.
return
B.
goto
C.
go back
D.
switch
39.
The default parameter passing mechanism in a function is
A.
Call by value
B.
Call by reference
C.
Call by value result
D.
None of these
A.
Call by value
B.
Call by reference
C.
Call by value result
D.
None of these
40.
The meaning of keyword VOID before function name means
A.
Function should return any value
B.
No arguments are passed
C.
Function should not return any value
D.
None of the above
keyword VOID
A.
value
B.
C.
value
D.
41.
Every function in C is followed by
A.
Parameters
B.
Parenthesis
C.
Square Braces
D.
None of the above
C
A.
Parameters
B.
Parenthesis
C.
Square Braces
D.
42.
Which functions are used for single character input/output?
A.
getchar() putchar()
B.
scanf() putchar()
C.
getchar() printf()
D.
scanf() printf()
single character input/output
A.
getchar() putchar()
B.
scanf() putchar()
C.
getchar() printf()
D.
scanf() printf()
43.
The value obtained in the function is given back to main by using keyword?
A.
static
B.
New
C.
Dynamic
D.
return
main keyword
A.
static
B.
New
C.
Dynamic
D.
return
44.
Recursion is a process in which a function calls
A.
main() function
B.
itself
C.
another function
D.
none of the above
Recursion
A.
main() function
B.
C. function
D.
45.
The function scanf() returns
A.
0
B.
ASCII value of the input read
C.
The number of successful read input values
D.
The actual values read for each argument
scanf()
A.
0
B.
ASCII value of the input read
C.
The number of successful read input values
D.
The actual values read for each argument
7/11
46.
C Preprocessor takes care of
A.
Conditional compilation
B.
Include files
C.
Macros
D.
All of the above
C
A.
Conditional compilation
B.
Include files
C.
Macros
D.
All of the above
47.
A Preprocessor command
A.
Need not start on new line
B.
Has as first character
C.
Need not start on the first column
D.
All of the above
command
A.
B.
C.
D.
All of the above
48.
Which of the following are correct pre-processor directives in
1.#undef
2.#if
3.#elif
4.#error
A.
1,2
B.
C.
D.
2,4
1.#undef
2.#if
3.#elif 4.#error
A.
1,2
B.
C.
D.
2,4
49.
In which stage the execution of code #include<conio.h> gets the contents of the file conio.h?
A.
During execution
B.
During linking
C.
During editing
D.
During preprocessing
stage #include<conio.h> content
A.
Execution
B.
Linking
C.
Editing
D.
Pre-processing
50.
What will be the output of the following program?
#include<stdio.h>
#define product a*b
void main()
int
printf("%d",
A.
3
B.
4
C.
12
D.
24
#include<stdio.h>
#define product a*b
void main()
int
printf("%d",
A.
3
B.
4
8/11
C.
12
D.
24
51.
Which of the following is a collection of different data types?
A.
String
B.
Array
C.
Files
D.
Structure
data types
A.
String
B.
Array
C.
Files
D.
Structure
52.
How many bytes are occupied by the following union?
union student
int
char name
A.
50
B.
51
C.
52
D.
54
union bytes
union student
int
char name
A.
50
B.
51
C.
52
D.
54
53.
How many bytes are occupied by the following structure?
struct employee
int emp_id;
double ph_no;
char name
A.
100
B.
106
C.
108
D.
110
structure bytes
struct employee
int emp_id;
double ph_no;
char name
A.
100
B.
106
C.
108
D.
110
54.
For accessing a structure elements using a pointer, you must use
A.
Pointer Operator Operator)
B.
Dot Operator Operator)
C.
Pointer Operator Operator)
D.
Arrow Operator
pointer structure elements
A.
Pointer Operator Operator)
B.
Dot Operator Operator)
C.
Pointer Operator Operator)
D.
Arrow Operator
55.
Most appropriate statement to describe Union is
A.
Union are like Structures
B.
Union contain members of different data types which share the same storage area in memory
C.
Union is less frequently used in a program
D.
Union are used for set operations
Union .....
9/11
A.
Union structure
B.
Union
C. union
D.
Union
56.
Which operator is used for connecting a structure name to its member name?
A.
operator
B.
operator
C.
. operator
D.
All of the above
sturcture name member
A.
operator
B.
operator
C.
. operator
D.
All of the above
57.
Which of the following have similar syntax?
A.
Structure and union
B.
Union and array
C.
Structure and pointer
D.
Array and pointer
A.
Structure and union
B.
Union and array
C.
Structure and pointer
D.
Array and pointer
58.
Which is the type of file?
A.
Text
B.
Binary
C.
Both
D.
None
A.
Text
B.
Binary
C.
Both
D.
None
59.
feof() indicates
A.
Error in a file
B.
End of file
C.
Move to the beginning of file
D.
Move to desired position in file
feof()
A.
file error
B.
C.
move
D.
move
60.
The contents of an existing file will be lost if it is opened in
A.
mode
B.
mode
C.
mode
D.
None of the above
....
A.
mode
B.
mode
C.
mode
D.
61.
The process of accessing data stored in a tape is similar to manipulating data on a
A.
Queue
B.
Stack
C.
List
D.
None of the above
A.
Queue
B.
Stack
C.
List
D.
62.
The function fopen ("filename", return
A.
Nothing
B.
Value 0 or 1 depending whether file can be opened or not
C.
A pointer to FILE filename, if it exists
D.
A pointer to a new file after creating it
fopen ("filename",
A.
Nothing
B.
Value 0 or 1 depending whether file can be opened or not
C.
A pointer to FILE filename, if it exists
D.
A pointer to a new file after creating it
63.
In the given statement fprintf(fptr,
The variable fptr is a/an
10/11
A.
Integer variable
B.
Arbitrarily assigned value
C.
Pointer to a file
D.
Special kind of variable called file
fprintf (fptr, fptr .......
A.
Integer variable
B.
assigned value
C.
Pointer to a file
D.
Special kind of variable called file
64.
((fpt=fopen("sample.txt","w")) NULL) would be true if
A. The file sample does not exist while fopen is being executed
B. The file sample could not be created for writing
C. fpt is declared as a FILE pointer
D. The file sample is read only
fopen ("sample.txt", nULL)
A.
sample
B.
sample write
C.
fpt FILE
D.
sample read
65.
If a file is opened in mode then
A.
Reading is possible
B.
Writing is possible
C.
After writing, reading is possible without closing and reopening
D.
All of the above
W
A.
Reading
B.
Writing
C.
write read
D.
66.
The fseek function
A.
Needs 3 arguments
B.
Makes the rewind function unnecessary
C.
Is meant for checking whether a given file exists or not.
D.
Both and
fseek
A.
B.
rewind
C.
D.
67.
fputs() returns
A.
EOF if an error occurs
B.
Non-negative if no error
C.
Both and
D.
None of the above
fputs()
A. EOF error
B.
error
C.
D.
68.
The value of EOF is
A.
B.
0
C.
1
D.
10
EOF
A.
B.
0
C.
1
D.
10
69.
getc() is used to
A.
Read a string from file
B.
Read a character from file
C.
Read integer from file
D.
Read anything from file
getc()
11/11
A.
string read
B.
character read
C.
integer read
D.
read
70.
How can we modify an already existing file?
A.
Using Write Mode
B.
Using Read Mode
C.
Using Append Mode
D.
None of the above
A.
Write mode
B.
Read mode
C.
Append mode
D.
Other Question Papers
Subjects
- a. c. distribution & utilization
- a.c. distribution & utilization
- advance manufacturing system
- advanced building materials
- advanced computer programming
- advanced mathematics (group-1)
- advanced mathematics(group-2)
- aircraft maintenance-ii
- aircraft navigation and radio system
- aircraft performance & stability
- applied electronics and instrumentation
- applied science-i (physics)
- applied science-ii(chemistry)
- architectural drawing-ii
- automation in fabrication technology
- automobile electrical system
- automobile engines
- automobile transmission & mechanism
- basic automobile design
- basic avionics
- basic chemistry ( group-4)
- basic control system
- basic design
- basic electronic circuits
- basic electronics
- basic of electrical and electronics engineering
- basic of electrical engineering
- building material
- chemical engineering plant economics
- chemical process equipment design
- chemical process technology - i
- chemical process technology - ii
- chemical process technology –i
- civil engineering drawing
- cnc machines
- communication engineering- i
- communication engineering-ii
- communication skill
- communication skill-ii (aa)
- communication skills
- computer aided modelling & design
- computer application in wet processing
- computer graphics
- computer maintenance
- computer organization and architecture
- construction technology
- construction works management
- control system components
- costing estimation & management
- d.c.circuits
- data & computer communication
- data structure management
- database management system
- database programming with vb.net
- design fundamental-i
- design fundamental-ii
- design visualization
- digital electronics
- drying and firing
- dyes and pharmaceuticals
- ecology & environmental pollution
- electical machine-1
- electrical installation & maintenance
- electrical instrumentation
- electrical machine-ii
- electronic materials & components
- electronic materials and component
- electronic networks
- electronics devices and circuits-i
- electronics devices and circuits-ii
- electronics instrument & measurements
- electronics networks & lines
- elements of civil engineering
- elements of mechanical engineering
- engineering drawing
- engineering mechanics
- english communication and architecture vocabulary
- entrepreneurship development
- environmental monitoring
- essentials of environment & seismic engineering
- estimating & costing
- estimating and costing - i
- extrusion die design
- fabric structure - ii
- fabrication technology
- fabrication technology - ii
- fiber optic communication
- finishing technology for textile
- fluid flow operation
- fluid mechanics & hydraulic machines
- fundamental of chemical engineering reactions & thermo dynamics
- fundamental of electronics circuits
- fundamental of mechanical engineering
- generation and transmission of electrical power
- glass-ii
- high performance & green plastics
- history of architecture - ii
- history of architecture -i
- history of architecture(indian)
- human resource management
- hydraulic and pneumatic
- hydraulic and pneumatic devices
- hydraulics
- industrial management
- industrial stoichiometry
- irrigation engineering
- manufacturing engineering-1
- manufacturing engineering-i
- manufacturing engineering-ii
- manufacturing process & material technology
- mass transfer - i
- mass transfer-i
- material science and metallurgy
- material technology
- mathematics - i
- mechanical drafting
- mechanical operation (ceo- i)
- mechanical operation (ceo-i)
- mechanics of structure-ii
- mechanics of structures - i
- metrology & instrumentation
- microcontroller
- microprocessor & assembly language programming
- mine surveying-ii
- non conventional energy sources
- operating system
- organic chemistry
- petroleum refining & petro chemical technology
- physical analytical & inorganic chemistry
- plant maintenance & safety
- polymer chemistry - 1
- polymer chemistry - ii
- principles of chemical engineering
- process equipment design
- process heat transfer
- process technology
- processing of thermoset
- programmable logic controller
- programming in c
- programming in c++
- pulp and paper technology
- quantity survey & costing
- refractory
- relational database management system
- robotics & automated material handling
- ship building & ship recycling
- software engineering
- soil engineering
- strength of materials
- structure - i
- structure-i
- surveying
- surveying - i
- surveying-ii
- system analysis design
- technical drawing- i
- technology of technical textiles
- television engineering
- theory of machine
- thermodynamics
- thermodynamics & hydraulics
- transportation engineering
- under ground mining of coal
- utilities and instrumentation in chemical plant
- vehicle dynamics
- visual basic
- water resources management
- white ware
- yarn manufacturing technology-iii