C Programming 1

$7.50

SKU: AMSEQ-038 Category:

C Programming

Q1: What are the different storage classes available in ‘c’? Explain any one of them.

Q2: With the help of a ‘C’ program define call by value and call by reference.

Q3: What do you understand by output device? Explain printer and printing mechanism of character by dot matrix.

Q4: Differentiate between compiler and interpreter

Q5: What is the basic difference between DVORAK and QWERTY pattern of keyboards? Explain in the context of current market usage.

Part – 2

Q1: A 5 digit positive integer is entered through the keyboard, write a function to calculate sum of digits of the 5 digit number
a) Without using recursion
b) Using recursion

Q2: Write a recursive function to obtain the first 25 numbers of a Fibonacci sequence. In a Fibonacci sequence the sum of two successive terms gives the third term. Following are the first few terms of the Fibonacci sequence
1 1 2 3 5 8 13 21 34 55 89…..

Objective Type
Just Bold/italic for correct answers

Q1. Which of the following statements is true?
C Library functions provide I/O facilities
C inherent I/O facilities
C doesn’t have I/O facilities
Both (a) and (c)

Q2. Header files in C contain
Compiler commands
Library functions
Header information of C programs
Operators for files

Q3. Which pair of functions below are used for single character I/O.
Getchar() and putchar()
Scanf() and printf()
Input() and output()
None of these

Q4. The printf() function retunes which value when an error occurs?
Positive value
Zero
Negative value
None of these

Q5. Identify the wrong statement
a) putchar(65)
putchar(‘x’)
putchar(“x”)
putchar(‘n’)

Q6. The output of printf(“%u”, -1) is
-1
minimum int value
maxium int value
Error message

Q7. An Ampersand before the name of a variable denotes
Actual Value
Variable Name
Address
Data Type

Q8. Symbolic constants can be defined using
# define
const
symbols
None of these

Q9. Null character is represented by
n

o
e

Q10. Which header file is essential for using strcmp() function?
string.h
strings.h
text.h
strcmp.h

Q11. malloc() function used in dynamic allocation is available in which header file?
stdio.h
stdlib.h
conio.h
mem.h

Q12. File manipulation functions in C are available in which header file?
streams.h
stdio.h
stdlib.h
a) files.h

Q13. C supports how many basic looping constructs
2
3
4
6

Q14. statement differs from expression by terminating with a
.
,
.
.

Q15. What should be the expression return value for a do-while to terminate
1
0
Null
.

Q16. Which among the following is a unconditional control structure
do-while
if-else
goto
for

Q17. continue statement is used
to go to the next iteration in a loop
come out of a loop
exit and return to the main function
restarts iterations from beginning of loop

Q18. Which operator in C is called a ternary operator
()
if..then
++
?:

Q19. Which of the following header file is required for strcpy() function?
string.h
strings.h
files.h
strcsspy()

Q20. The meaning of conversion character for data input is
Data item is a long integer
Data item is an unsigned decimal integer
Data item is a short integer
None of the above

Q21. The conversion characters for data input means that the data item is
An unsigned decimal integer
A short integer
A hexadecimal integer
A string followed by white space

Q22. Which of the following is a key word is used for a storage class
printf
external
auto
scanf

Q23. In the C language ‘a’ represents
a digit
an integer
a character
a word

Q24. The number of the relational operators in the C language is
Four
Six
Three
One

Q25. A compound statement is a group of statements included between a pair of
double quote
parenthesis
curly braces
a pair of /’s

Q26. A Link is
a compiler
an active debugger
a C interpreter
a analyzing tool in C

Q27. The continue command cannot be used with
for
switch
do
while

Q28. In C, a Union is
memory location
memory store
memory screen
None of these

Q29. When the main function is called, it is called with the arguments
argc
argv
None of these
both a & b

Q30. A multidimensional array can be expressed in terms of
array of pointers rather than as pointers to a group of contiguous array
array without the group of contiguous array
data type arrays
None of these

Q31. C allows arrays of greater than two dimensions, who will determined this
programmer
compiler
parameter
None of these

Q32. A pointer to a pointer in a form of
multiple indirection
a chain of pointers
both a and b
None of these

Q33. Pointers are of
integer data type
character data type
unsigned integer data types
None of these

Q34. Maximum number of elements in the array declaration int a[5][8] is
28
32
35
40

Q35. If the size of the array is less than the number of initializers then,
Extra values are being ignored
Generates an error message
Size of Array is increased
Size is neglected when values are given

Q36. Array subscripts in C always start at
-1
1
0
Value provided by user

Q37. A Structure
can be read as a single entity
cannot be read as a single entity
can be displayed as a single entity
has member variables that cannot be read individually

Q38. Identify the invalid pointer arithmetic
Addition of float value to a pointer
Comparison of pointers that do not point to the element of the same array
Subtracting an integer from a pointer
Assigning the value 0 to a pointer variable

Q39. Which is the correct way to declare a pointer?
int_ptr;
int *ptr;
*int ptr;
None of these

Q40. If you want to exchange two rows in a two dimensional array, the fastest way is to:
Exchange the elements of the 2rows
Exchange the address of each element in the two row
Silence the address of the rows in an array of pointer and exchange the pointer
None of these

– See more at: https://distpub.com/products-page/product-category/assignments/C-Programming-1/#sthash.Uy1Nhvh3.dpuf

Reviews

There are no reviews yet.

Be the first to review “C Programming 1”

Your email address will not be published. Required fields are marked *

PlaceholderC Programming 1
$7.50