Download Model question papers & previous years question papers

Posted Date: 22 Jan 2012      Posted By:: vibhor garg    Member Level: Bronze  Points: 5 (₹ 1)

2012 The Global Open University, Nagaland M Tech Automobile Global open University BSc Computer Science 1st year Paper of Programming in C Question paper



Course: M Tech Automobile   University/board: The Global Open University, Nagaland





jan, 2012
Duration: 2 Hours
Course: B.Sc. Computer Science
Year: First Year
Paper Name: Programming in C

ATTEMPT ALL THE BELOW MENTIONED QUESTIONS:
1) In C, square bracket 0 are used in
a. Functions
b. Arrays
c. Statements
d. All of the above
2) Almost every C program begins with
the statement
a. Main ()
b. Print f ()
c. #include
d. SCAN()
3) The braces that surround the code in a
C program
a. Show what code goes in a particular
function
b. delimit a section of
c. Separate the codes code from the constant
d. Separate the source file from the subject
file
4) A single character input from the
keyboard can obtained baby using the
functions
a. print ( )
b. get char ( )
c. put char ( )
d. Scan ( )
5) The function scan ( ) reads
a. a single character
b. character strings
c. any possible variable type
d. any possible number
6) An identifier in C
a. is a name of thing such as variable and
function
b. is made up of letters numerals and the
underscore
c. can obtain both upper case and lower case
d. all of the above
7) Declaring variables is advantageous
because it
a. avoids error from misspelled variable
names
b. helps the liner work efficiently
c. simplifies the writing of very short
programs
d. all of the above
8) The operator <> are
a. assignment operators
b. relational operators
c. logical operators
d. bitwise logical operators
9) Which of the following scan ( )
statements is used?
a. scan ("%f, float-carnage);
b. scan ("%d & sum")
c. scanf ("%d", & int-varname)
d. scan ("%d',& number)
10) The meaning of conversion character
h for data input is
a. data item is an unsigned decimal integer
b. data item is a short integer
c. data item is a hexadecimal integer
d. data item is a string following by a white
space character
11) The conversion character (s) for data
input means that the
data item is
a. an unsigned decimal integer
b. a short integer
c. a hexadecimal integer
d. a string followed by a white space
character
12) Any program in C has access to three
standard files
a. standard input file, standard output file,
standard error file.
b. stein, stout, steer
c. keyboarded, screen, screen
d. all of the above
13) The general form of do while
statements
a. do expression while statement
b. eddo while expression
c. do statement while (expression)
d. do statement while statement
14) The two statement that can be used
to change the flow of
control are
a. if and switch
b. if and while
c. switch and do while
d. break and continue`
15) The main difference in operation
between an if statement and
a while statement is
a. the while loop body is executed
b. the body of the while statement may be
executed many times, the
c. body of the if statement only once
d. the conditional expression following the
keyboard is evaluated differently
e. all of the above
16) The break statement is used to exit
from
a. a do loop
b. a for loop
c. a switch statement
d. all of the above
17) The traditional way to create an
infinite loop in C is
a. for (ii)...
b. if (=) break;
c. while ( )......
d. all of the above
18) The most common use of the one
dimensional array in C is the
a. string
b. character
c. data
d. function
19) The string related function replied by
C standard library is
a. stripy ( )
b. strata ( )
c. strum
d. All of the above
20) Main ( ) is example of
a. library function
b. user defined function
c. header
d. statement
21) In C, structure values can be passed
as arguments to functions by
a. Passing each member of the structure as
an actual argument of the function call
b. Passing a copy of the entire structure to
the called function
c. Passing the structure as an argument
using pointers
d. All of the above
22) For accessing a structure element
using a pointer, you must use
a. The dot operator (.)
b. the Pointer operator (&)
c. The pointer operator (*)
d. The arrow operator (->)
23) The array definition int marks
[10][5] defines an array of
a. 5 tables, 10 rows
b. 10 columns, 5 rows
c. 10 rows, 15 tables
d. 10 rows, 5 columns
24) What is the output of the following
'C' program ?
Main()
{
external int a ;
Printf ("\n%d",a);
}
int a = 20;
a. 0
b. 20
c. Error
d. Garbage value
25) 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]);
}
a. Garbage values
b. 2 3 3
c. 3 2 2
d. 0 0 0
26) In the following 'C' program, find out
the error, if any?
main()
{
int i = 1;
for(;;)
{
printf("%d, i++);
if (i > 10)
Break;
}
}
a. The condition in the for loop is a must
b. The two semicolons should be dropped
c. The for loop should be replaced by a while
loop
d. No error
27) What is the output of the following
'C' program ?
main()
{
int i = 2;
printf("n%d%d", ++i, ++i);
}
a. 3 4
b. 4 3
c. 4 4
d. Output may vary from compiler to
compiler
28 ) What is the output of the following
'C' program ?
main()
{
int x = 10, y = 10, z = 5, i ;
i = x
printf("\n%d", i);
}
a. 1
b. 0
c. Error
d. 5
29) Which of the following statements
about for loop is (are)
correct ?
a. Using break is equivalent to using gotothe
statement immediately following the
loop
b. Continue is used to by-pass the remainder
of the current pass of the loop
c. If comma operator is used, then the value
returned is the value of the right operand
d. All of the above.
30) What is the output of the following
'C' program ?
main()
{
printf("%f",sqrt(36.0));
}
a. 6.0
b. 6
c. 6.000000
d. Some absurd result
31) By default any real number in 'C' is
treated as
a. a float
b. a double
c. a long double
d. Depends upon the memory model that you
are using.
32) What is the output of the following
'C' program ?
main()
{
printf(5 + "Fascimile");
}
a. Error
b. Fascimile
c. mile
d. None of the above
33) What is the output of the following
'C' program ?
main()
{
printf("%c", "abcdefgh"[4]);
}
a. error
b. d
c. e
d. abcdefgh
34 ) What is the output of the following
'C' program ?
main()
{
char str[7] = "Strings";
pringf("%s",str);
}
a. Error
b. Strings
c. Cannot predict
d. None of the above
35) What is the output of the following
'C' program ?
main()
{
char ch = 'A';
printf("%d%d", sizeof(ch), sizeof('A'));
}
a. 1 1
b. 1 2
c. 2 2
d. 2 1
36) Which of the following statements
about for loop are correct ?
a. Index value is retained outside the loop
b. Index value can be changed from within
the loop
c. goto can be used to jump, out of the loop
d. All of the above
37 ) A file contains the line " I am a boy
\r\n" then on reading
this line into the array str suing fgets()
what would str contain ?
a. " I am a boy \r\n\0"
b. " I am a boy \r\0"
c. " I am a boy \n\0"
d. " I am a boy"
38) What is the output of the following
'C' program ?
main()
{
printf("\n%x", -1 >> 4);
}
a. ffff
b. 0fff
c. 0000
d. fff0
39) In a C program, constant is defined
a. Before main
b. After main
c. Anywhere, but starting on a new line
d. None of the above
40) The statement
printf("d",printf("tim*));
a. Result in a syntax error
b. Outputs tim3
c. Outputs garbage
d. Prints tim and terminates abruptly
41) The rule for implicit type conversion
in 'C' is
a. int < unsigned < float < double
b. unsigned < int < float < double
c. int < unsigned < double < float
d. unsigned < int < double < float
42) Which of the following statements is
correct ?
a. C provides no input-output features
b. C provides no file access features
c. Provides no features to manipulate
composite objects
d. None of the above
43) Integer division in a 'C' program
results in
a. Truncation
b. rounding
c. overflow
d. None of the above
44) For 'C' programming language, which
of the following statements
is / are true ?
a. Constant expressions are evaluated at
compile time
b. String constants can be concatenated at
compile time
c. Size of array should be known at compile
time
d. All of the above
45 ) Which of the following operators in
'C' does not associate
from the left ?
a. +
b. ,
c. =
d. %
46) Which of the following operators in
'C' programming language
takes only integer operands ?
a. +
b. *
c. /
d. %
47) Which of the following operators in
'C' does not associate
from the right ?
a. ,
b. =
c. +=
d. ++
48) Which is the output of the following
program fragment (in C) ?
int x,y = 2, z, a;
x=(y*=2) + (z= a= y);
printf("%d",x);
a. prints 7
b. prints 6
c. prints 8
d. is syntactically wrong
49) What does the statement
printf("%d", 10 ? 0 ? 5:1:12); print ?
a. 10
b. 0
c. 12
d. 11
50) what does the following C statement
print ?
printf("%d",++5);
a. 5
b. 6
c. 7
d. An error message
51 ) The statement printf("%d", (a++));
prints
a. The current value of a
b. The value of a+1
c. An error message
d. Garbage
52) What is the output of the following
'C' fragment ?
int a = 4; b = 6;
printf("%d", a==b);
a. Outputs an error message
b. Prints 0
c. Prints 1
d. None of the above
53) Which of the following comments
regarding the reading of a
string, using scanf(with option) and gets
is true ?
a. both can be used interchangeably
b. Scanf is delimited by end of line, while
gets is not
c. Scanf is delimited by blank, while gets is
not
d. None of the above
54) in C programming language x -= y+1;
means
a. x= x- y + 1
b. x = -x-y -1
c. x= -x+ y + 1
d. x= x- y - 1
55) Which of the following comments
about the ++ operators is/are
correct?
a. It is unary operator
b. the operand can come before or after the
operator
c. It cannot be applied to an expression
d. All of the above
56) printf("%c", 100) statement in 'C'
a. prints 100
b. prints the ascii equivalent of 100*
c. prints garbage
d. None of the above
57 ) Which of the following C statements
is syntactically correct ?
a. for();;
b. for(;);
c. for(,);
d. for(;;);
58) A design approach to solve problem
which is based on the
Dictum "Divide and rule " is
a. Top-Down design
b. Bottom -up design
c. Structural design
d. Objected oriented design
59) A basic approach of a problem
solving technique which includes
solving the most basic (smallest) units in
the hierarchy first and then use them to
build more sophisticated bigger units is :
a. Top-Down design
b. Bottom-up design
c. Structural design
d. OOPs design
60) __________is a finite list of welldefined
steps for solving a
particular problem. These instructions,
when executed in the specified
order to solve a problem
a. Flowchart
b. Pert chart
c. Data flow chart
d. Algorithm
61) An algorithm has following
execution-sequences
a. Sequence Logic or Sequential Logic
b. Selection or Conditional Logic
c. Iteration or Repetitive Logic
d. All of the above
62) Select unconditional Loop instruction
used in algorithm
a. If instruction
b. Do-while
c. Repeat-until
d. Goto
63) If f(n) and g(n) are functions defined
over '+ve' integers then
the order of complexity of an algorithm
may also be expressed in
terms of 'O' notation as
a. f(n) > o (g(n))
b. f(n) = o(g(n))
c. g(n) = o (f(n))
d. None of these
64) Binary search requires
_____________ before searching
a. Array elements arranged one below the
other.
b. Array elements arranged in random order
c. Array elements sorted in Ascending or
descending order
d. All of the above
65) Executing an algorithm may be
thought of as calling the algorithm
passing values to it and receiving what it
returns after execution. When an
algorithm uses or calls itself within its
definition, it is known as
a. Recursive Algorithms
b. Searching algorithm
c. Traversal algorithm
d. Dynamic algorithm
66) A flow chart is a
a. Pictorial representation using computer
language like BASIC
b. A chart with control flow of a program.
c. Pictorial representation of the variables
used.
d. Pictorial representation of an algorithm
67) A rectangle symbol is used for
a. Decision making
b. Computational steps
c. Branching the flow of control
d. End of the program.
68) Input or output is represented by
__________ symbol in a flowchart
a. Square
b. Parallelogram
c. Rectangle
d. Circle
69) The decision table contains the
following part
a. Condition part
b. Action part
c. Rule part
d. All of the above
70) A Pseudo code is a
a. An algorithm written in computer language
b. Coding from algorithm into a program with
an intermediate language
c. Coding with a programming language
d. Coding with English language.





Return to question paper search

Next Question Paper: First Year - Kannada Language - Paper I

Previous Question Paper: First Year - Optional Kannada - Paper II

Related Question Papers:


  • Global open University MBA 1st year Paper of Computer Fundamentals


  • Global open University MA English 1st year Paper of Modern Literature


  • Global open University MBA 1st year Paper of Accounting and Financial Administration


  • Global open University MPT 1st year Paper of Manual Medicine and Applied Physiotherapy


  • Global open University M.Sc. Electronics 1st year Paper of Digital System Design


  • Categories


    Submit Previous Years University Question Papers and make money from adsense revenue sharing program

    Are you preparing for a university examination? Download model question papers and practise before you write the exam.


    Looking for University or College admissions in India for 2023 - 2024 Academic Year?

    APPLY NOW
    Top Contributors
    TodayLast 7 Daysmore...

    Awards & Gifts

    Online Members

    More...
     
    Promoted by: SpiderWorks Technologies Pvt Ltd, Kochi - India. © All Rights Reserved.