C Programming 18

COEP
Lets Crack Online Exam

IT Interview Exam Questions: C Programming 18 (IT Interview Exam Question, IT Campus Placement)

Subject: C Programming 18

Part 18: List for questions and answers of C Language

 

Q1. An object oriented language is used because

a) Own data types can be created

b) An object oriented program can be taught to correct its own erros

c) It is easier to conceptualize an object

d) both (a) and (c)

 

Q2. In the statement template <> class t<>

a) t is a class

b) T is a scalar variable

c) Either (a) or (b)

d) None of these

 

Q3. The order of an algorithm that finds whether a given boolean function of ‘n’ variables, produces a 1 is

a) Constant

b) Non-linear

c) Logarithmic

d) exponential

 

Q4. If following program (myprog)is run from the command line as myprog friday tuesday sunday then what would be the output?

#include <stdio.h>

Main (int argc,char*argv) 

   printf(“%c”,**++argv);

}

a) M

b) f

c) Myprog

d) None of these

 

Q5. The number of binary strings of n zeroes and k ones such that no two ones are adjacent, is

a) n h ck

b) N ck

c) Nckh

d) None of these

 

Q6. Let f : {a, b}* (a, b}* be given by f (n) = ax for every value of n e {a, b} then f is

a) one to one not onto

b) One to one and onto

c) Not one to one and not onto

d) Not one-to one and onto 

 

Q7. Which of the following types of programs would require the program data to be sorted in order for the programs to work correctly ?

a) programs that display department names in alphabetical order

b) Programs that display sales amounts in numerical order

c) Programs that display subtotals in reports

d) All of these

 

Q8. The number of binary relations on a set with n elements is

a) N2

b) 2n

c) 2n^2

d) None of these

 

Q9. A text is made up of the characters a, b, c, d, e each occurring with the probability 0.12, 0.4, 0.15,0.08 and .25 respectively. The optimal coding tech-nique will have the average length of

a) 2.15

b) 3.78

c) 2.78

d) 1.78

 

Q10. C is a

a) High level language

b) Low level language

c) high level language with some low level features

d) Low level language with some high level features

 

Q11. Which of the following comments are true ?

a) C provides no input-output and file access features

b) C provides no features to manipulate composite objects

c) C borrowed most of its ideas from bcpl

d) all of the above

 

Q12. Which of the following comments about eof are true?

a) Its value is defined within stdio.h

b) Its value is implementation dependent and cant be negative

c) Its value should not equal the integer equivalent of any character

d) all of the above 

 

Q13. In standard c, trigraphs in the source program are translated

a) Before the lexical analysis

b) Before the recognition of escape characters in strings

c) both (a) & (b)

d) During the intermediate code generation phase

 

Q14. Which of the following are not the keywords in c?

a) Printf

b) Main

c) if

d) None of above

 

Q15. Which of the following features of c is meant to provide reliable access to special memory locations?

a) Static_const

b) Pragma

c) volatile

d) Immutable

 

Q16. Choose the best answer. Storage class defines

a) The datatype

b) The scope

c) the scope and permanence

d) The scope,permanence and datatype

 

Q17. Bit field

a) Is a field having many sub-fields

b) Is a structure declaring the sizes of the members in terms of bits

c) is a member of a structure whose size is specified in terms of bits

d) None of the above

 

Q18. Which of the following features of c is meant to provide reliable access to special memory locations?

a) Static_const

b) Pragma

c) volatile

d) Immutable 

 

Q19. Storage class defines

a) The datatype

b) The scope

c) the scope and permanence

d) The scope. Permanence and datatype

 

Q20. Choose the correct statement

a) 0 represents a false condition

b) Non-zero value represents a false condition

c) 1 represents a false condition

d) Anything that is not 1 represents a false condition 

 

Part 18: List for questions and answers of C Language

 

Q1. Answer: d

 

Q2. Answer: a

 

Q3. Answer: d

 

Q4. Answer: b

 

Q5. Answer: a

 

Q6. Answer: a

 

Q7. Answer: a

 

Q8. Answer: c

 

Q9. Answer: a

 

Q10. Answer: c

 

Q11. Answer: d

 

Q12. Answer: d

 

Q13. Answer: c

 

Q14. Answer: c

 

Q15. Answer: c

 

Q16. Answer: c

 

Q17. Answer: c

 

Q18. Answer: c

 

Q19. Answer: c

 

Q20. Answer: a