#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2009
    Posts
    7
    Rep Power
    0

    C interview questions


    Hi for all. these are some of the interview questions..please help me by answering these questions...thanks in advance



    1)A static function
    a) accesses external functions that reside in separate files.
    b)limits its scope to the file it resides in.
    c) accesses external functions that reside in one specific file.
    d)limits its scope to the variable it resides in.
    e)I donít know



    2)what should yo do with command-line arguments ?
    a)comment them out
    b)use them in the header
    c)document them
    d)use them after the fclose()

    3)Initialization in a C program does not occur

    a)in Variable protolypes.
    b) in variable declarations.
    c)as function arguments.
    d) as the result of a return argument within a function.
    e)I donít know

    4)Which is not true to create a structure that contains another structure as one of its members?
    a) Declare a structure variable of the type to be nested.
    b) Define the structure that is to be nested.
    C) Define the structure that will hold the nested structure.
    d)Define the variable that will house the nested structure.
    e) donítknow


    5)Which is not a component that makes up the ANSI standard C function?
    o The function start.
    o The function prototype or declaration.
    o The function call.
    o The function code or definition.
    o I donít know


    6)A common Link-Time Error is
    o in the source file, either with misspelled names of external functions or with a missing reference to an appropriate header file.
    o improperly spelled keywords.
    o improperly delimited code blocks involving either too few or too many braces.
    o a missing semi-colon following a C statement.
    o I donít know


    7)Which of the following is nota conditional compilation directive?
    o #if, #endif
    o #if, #eldef, #endif
    o #if, #else, #endit
    o #if, #elif, #endif
    o I donít know


    8)A constant cannot be
    o a character.
    o a number.
    o a word.
    o a symbol.
    o I donít know


    9)The notation to refer to an individual structure in the array
    o structure_variable_name[size]
    o array_name[element_number]
    o element_number[array_name]
    o size[structure_variable_name]
    o I donít know

    10)After you have created a source file,
    o the source code must be translated into a binary version.
    o the source code must be translated into an include statement.
    o the source code must be translated to a human-readable version.
    o the source code must be translated into library functions.
    o I donít know




    11)With which alternative I/O function do you press [ENTER] every time you enter a single character, to send the
    contents of the buffer to your program?
    0 getche()
    0 getchr()
    0 getchar()
    0 getch()
    0 I donít know


    12)When passing a structure member to a function, which lype does not need to match?
    o Function call
    o Structure definition
    o Function variable
    o Function prototype
    o I dont know



    13)The following is an example of what kind of argument:
    add_nums 12 24 36

    Ď argf
    0 argz
    0 argc
    ģ argv
    0 I dont know


    14)A general strategy for reading larger C programs is to first
    o locate the function maino.
    o locate the function printf.
    o read any programmer comments at the beginning of the program.
    o locate the function <studio.h>
    o I dont know


    15)The variables that comprise the structure are called the
    o members of the structure.
    o definitions of the structure.
    o functions of the structure.
    o templates of the structure.
    o I donít know

    16)You cannot use symbolic constants to define constants with
    o symbols.
    o floating-point values.
    o characters.
    o formulas.
    o I dont know


    17)Which is not a rule and/or guideline for preprocessor directives?
    o A directive can appear aníywhere in the program, but some, especially the #include and #define directives, are usually located at the beginning of the program.

    o The directive is in effectfrom its location in the program to the
    end of the program.

    o A directive is not limited to one logical line in length, or until the first new line is encountered.

    o The directive must begin with the # character.

    o I donít know


    18)What are the unary operators involved in setting up the pass-by reference?
    o address and indirection
    o variable and constant
    o declaration and definition
    o Integer and character
    o I dont know


    19)To create an array, which of the following would you not need to specil\i?
    o The location.
    o The name
    o The size, or number of elements
    o The data type.
    o I dont know


    20)The files that comprise the C standard library usually reside in two locations:
    o A directory containing the library files and a directory containing the function files.
    o A directory containing the header files and a directory containing the prototype
    o A directory containing the libraryfiles and a directory containing the header files.
    o A directory containing the header files and a directory containing the footer files.
    o I dont know


    21)Which is not a type of problem that you should check for with any user-input data?
    o That data is in the format you expect for example, that users actually input numbers or characters when your program calls for such data.
    o That the data users enter is always limited to 10 characters.
    o That the length is within the range you require and that it wonít exceed the capacily of the variables that youíll use to hold that input.
    Thatthe data users enter is logically correct.
    o I donít know


    22)Output cannot be directed from the following place:
    o The screen (default I/O device).
    o Atape.
    o Afile on disk.
    o A different form that it is translated into and sent as a signal.
    o I dont know


    23)When youíre moditqing a program, you should follow an orderly process. Which is not a procedure you should follow?

    o Understand how the program works from the developerís standpoint.
    o Determine the relationships between those segments and any others connected to them.
    o Determine which code segments you need to work with.
    o Organize and review any documentation that relates to the portion of the code you will work with.
    o I donít know

    24)To determine which code has been written as functions
    o examine the definition prototype list.
    o examine the function prototype list.
    o examine the argument definition list.
    o examine the function definition list.
    o I dont know


    25)A Pointer cannot be used to
    o improve the efficiency of your program.
    o allow you to modiIi variable arguments passed to a function.
    o allowyouto modiIí the variableís location in memory.
    o use the dynamic memory allocation routines.
    o I donít know


    26)Which of the following is not an advantage of C?
    o C compilers can generate machine code that executes extremely fast.
    o C is a structured language.
    o C programs are portable.
    o C has only one distinct operator.
    o I dont know


    27)Which pointer does not refer to a standard stream in the C language?
    o stdin
    o stdout
    o stderr
    o stddef
    o I dont know

    Comments on this post

    • sizablegrin disagrees
    • MaskedFox disagrees : we don't do your work for you.
    • Thr3ddy disagrees : Freaking retard
  2. #2
  3. Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Jun 2005
    Posts
    5,929
    Rep Power
    4856
    You want us to get you a job, then we have to do your work for years? Sheesh.
    Write no code whose complexity leaves you wondering what the hell you did.
    Politically Incorrect DaWei on Pointers Grumpy on Exceptions
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2007
    Posts
    921
    Rep Power
    541
    You can do the interview quite easily: simply check the "I don't know" option for every question.

    That will give the interviewer an honest appreciation of the skills you offer.
    Right 98% of the time, and don't care about the other 3%.

    ďIt has been said that the great scientific disciplines are examples of giants standing on the shoulders of other giants. It has also been said that the software industry is an example of midgets standing on the toes of other midgets.Ē (Alan Cooper)
  6. #4
  7. Contributing User

    Join Date
    Aug 2003
    Location
    UK
    Posts
    5,119
    Rep Power
    1807
    You don't want that job. The questions are really dumb. If the interviewer thinks these are important, or a good way of selecting a good candidate, they are wrong, and you'd only end up working with people just as clueless as yourself.

    Road sweeping is more your level.

    Clifford

IMN logo majestic logo threadwatch logo seochat tools logo