Programming in 'C'
C programming language fundamentals covering data types, operators, string functions, and memory management
Questions
Which of the following data types allows an user to define his own identifier to represent an existing data type in 'C'?
- enumeration
- int
- type def
- float
What is the range of integer data type in ANSI 'C'?
- -3.4E38 to +3.4E39
- -32768 to +32767
- -128 to +127
- None of these
Which of the following operators are used in 'C' to operate at Bit-level in a program?
- Arithmetic operators
- Relational operators
- Bitwise operators
- None of these
Which of the following string handling functions in 'C' compares the first n characters of two input strings?
- strcmp()
- strncmp()
- strncpy()
- none of these
Which of the following string handling function in 'C' searches for a specified character in the string?
- strlwr()
- strupr()
- strnchr()
- None of these
Which of the following types of errors is generated when undeclared names and type incompatibilities errors are displayed on the screen?
- Lexical phase errors
- Semantic errors
- Syntactic phase errors
- None of these
Which of the following memory allocations refers to the process of allocating memory at compile-time before the associated program executed, unlike dynamic memory allocation where memory is allocated as required at run-time?
- Stack memory allocation
- Static memory allocation
- Dynamic memory allocation
- None of these
Which of the following is particular kind of unintentional memory consumption by a computer program where the program fails to release memory when no longer needed?
- Memory leak
- Reference counting
- Garbage collection
- None of these