Variable Function Structure Pointer C Programming Interview Questions Basics Viva Tutorials

1.) Smallest element of array's index is called
a.) lower bound
b.) upper bound
c.) range
d.) Extraction
ANSWER: a.) lower bound

2.) O(N)(liner time) is better than O(1) constant time.
a.) TRUE
b.) FALSE
ANSWER: b.) FALSE

3.) what is the maximum number of dimensions an array in C may have ?
a.) two
b.) eight
c.) twenty
d.) theoretically no limit only practical limits are memory size and compilers
ANSWER: d.) theoretically no limit only practical limits are memory size and compilers

C Frequently Asked Questions
C-Job Interview Questions

C Viva Questions for Freshers Basics
Keywords In C- Volatile Static Variable

4.) Array passed as an argument to a function is interpreted as 
a.) Address of the array
b.) Values of the first elements of the array
c.) Address of the first element of the arrayd.) Number of element of the array 
ANSWER: c.) Address of the first element of the array

5.) Which of the following is the correct way of declaring a float pointer: 
a.) float ptr;
b.) float *ptr;
c.) *float ptr;
d.) None of the above
ANSWER: b.) float *ptr;

6.) The size of a structure can be determined by  

a. size of variable name 
b. sizeof(struct tag)

a.) Only a
b.) Only b
c.) Both a and b
d.) none of the above
ANSWER: c.) Both a and b

7.) fputs function is used to
a.) write characters to a file
b.) takes 2 parameters
c.) returns a character
d.) requires a file pointer
e.) write characters to a file,takes 2 parameters,returns a character
ANSWER: c.) write characters to a file,takes 2 parameters,returns a character

8.) Which of the following statements should be used to obtain a remainder after dividing 3.14 by 2.1 ?
a.) rem = 3.14 % 2.1;
b.) rem = modf(3.14, 2.1);
c.) rem = fmod(3.14, 2.1);
d.) Remainder cannot be obtain in floating point division
ANSWER: c.) rem = fmod(3.14, 2.1);

9.) What are the types of linkages?
a.) Internal and External
b.) External, Internal and None
c.) External and None
d.) Internal
ANSWER: b.) External, Internal and None

10.) Which of the following special symbol allowed in a variable name?
a.) * (asterisk)
b.) | (pipeline)
c.) - (hyphen)
d.) _ (underscore)
ANSWER: d.) _ (underscore)

11.) Can you use the fprintf() to display the output on the screen?
a.) Yes
b.) No
ANSWER: a.) Yes

12.) The function that calls itself for its processing is known as.
a.) Inline Function
b.) Nested Function
c.) Overloaded Function
d.) Recursive Function
ANSWER: d.) Recursive Function

13.) In C, if you pass an array as an argument to a function, what actually gets passed?
a.) Value of elements in array
b.) First element of the array
c.) Base address of the array
d.) Address of the last element of array
ANSWER: c.) Base address of the array

14.) The library function used to find the last occurrence of a character in a string is 
a.) strnstr()
b.) laststr()
c.) strrchr()
d.) strstr()
ANSWER: c.) strrchr()

15.) Who calls to the fuction main()
a.) kernel
b.) operating system
c.) cpu
d.) ALU
ANSWER: b.) operating system

16.) What is the result of 16>>2?
a.) 4
b.) 8
c.) 3
d.) 0
ANSWER: b.) 8

17.) The size of a structure can be determined by

a. size of variable name
b. size of (struct tag)"

a.) Only a
b.) Only b
c.) Both a and b
d.) None of these options
ANSWER: c.) Both a and b

18.) A program is a:
a.) Javascript for a theatrical play
b.) Set of implementations
c.) A list of instructions (actions) to accomplish a task
d.) What you watch on TV
ANSWER: c.) A list of instructions (actions) to accomplish a task

19.) In mathematics and computer programming, which is the correct order of mathematical operators ?
a.) Addition, Subtraction, Multiplication, Division
b.) Division, Multiplication, Addition, Subtraction
c.) Multiplication, Addition, Division, Subtraction
d.) Addition, Division, Modulus, Subtraction
ANSWER: b.) Division, Multiplication, Addition, Subtraction

20.) Which of the following cannot be checked in a switch-case statement?
a.) Character
b.) Integer
c.) Float
d.) enum
ANSWER: c.) Float

Related

Variables in C 8711331606157559561

Post a Comment

SPAMMING will not be Appreciated.

emo-but-icon

Hot in week

Recent

Comments

Our Channel

Contact Us

Name

Email *

Message *

Follow by Email

item