C Interview Questions - 7

Tuesday, March 18, 2008

  • What is linklist and why do we use it when we have arrays? - I feel correct answer should be linklist is used in cases where you don’t know memory required to store data structure and need to allocate is dynamically on demand.
  • What is maximum combined length of command line arguments including space between adjacent arguments?
  • What is near, far and huge pointers? How many bytes are occupied by them?
  • What is object file? How can you access object file?
  • What is pointer?
  • What is recursion?
  • What is similarity between Structure, Union and enumeration?
  • What is static identifier?
  • What is structure?
  • What is use of typedef?
  • When reallocating memory if any other pointers point into same piece of memory do you have to readjust these other pointers or do they get readjusted automatically?
  • Where are auto variables stored?
  • Where does global, static, local, register variables, free memory and C Program instructions get stored?
  • Write down equivalent pointer expression for referring same element a[i][j][k][l]?
  • advantages of using pointers in program?
  • advantages of using typedef in program?
  • bit fields? What is use of bit fields in Structure declaration?
  • declare following:
    array of three pointers to chars,
    array of three char pointers,
    pointer to array of three chars,
    pointer to function that receives int pointer and returns float pointer,
    pointer to function that receives nothing and returns nothing
  • detect loop in linked list?
  • differences between malloc() and calloc()?
  • differences between structures and arrays?
  • different storage classes in C?
  • dynamically allocate one-dimensional and two-dimensional array of integers?
  • enumerations?
  • implement substr() function that extracts sub string from given string?
  • macros? advantages and disadvantages?
  • obtain current time and Difference : two times?
  • obtain segment and offset addresses from far address of memory location?
  • print string on printer?
  • register variables? advantage of using register variables?
  • that function should be used to free memory allocated by calloc()?
  • that header file should you include if you are to develop function that can accept variable number of arguments?

0 comments:

Post a Comment

Chitika

About This Blog

Followers

  © Blogger template The Professional Template II by Ourblogtemplates.com 2009

Back to TOP