C Languages Interview Questions

17. What is the difference between structured oriented, object oriented and non structure oriented programming language?
  Structured oriented programming language:
  • In this type of language, large programs are divided into small programs called functions.
  • Prime focus is on functions and procedures that operate on data.
  • Data moves freely around the system from one function to another.
  • Program structure follows "Top down Approach"
  • Example: C, Pascal, ALGOL and Modula-2.
Object oriented programming language:
  • In this type of language, programs are divided into objects.
  • Prime focus is on the data that is being operated and not on the functions or procedures.
  • Data is hidden and cannot be accessed by external functions.
  • Program structure follows Bottom up Approach Example: C++, Java and C#.
Non structure oriented programming language:
  • There is no specific structure for programming this language.
  • Example: BASIC, COBOL, FORTRAN
 
Your Name Your Email-ID
Your Answer
18. What is the difference between array and string in C?
 
  • Array can hold any of the data types. But, string can hold only char data type.
  • Array size must be a constant value. So, array size can't be changed once declared. But, string size can be modified using char pointer.
 
Your Name Your Email-ID
Your Answer
19. What is the starting index of an array?
  The starting index of an array is 0 (zero).
 
Your Name Your Email-ID
Your Answer
20. What is scanf()?
 
  • scanf() function is an inbuilt library function in C which is available in C library by default. This function is declared and related macros are defined in "stdio.h" header file.
  • scanf() function is used to read character, string, numeric data from keyboard.
 
Your Name Your Email-ID
Your Answer
123456789101112


131415 Page 5 of 15