Pointer interview questions in c


Pointer interview questions and answer in c programming language


1. What is wild pointer?
7. What are demerits of pointers?

10 comments:

  1. answers for above questions

    ReplyDelete
  2. how 2 find answer for above questions


    www.forum.symphoniks.com

    ReplyDelete
  3. i need more c progam qustns(not puzzles)
    need name of pgm

    ReplyDelete
  4. Wild pointer=A pointer pointing to an invalid address for exp.
    int *p=0x23ac45;
    The assigned address may be valid or invalid r/w to this address leads to segmentation fault.
    also int *p;
    p is pointing to an invalid address beware using them.

    ReplyDelete
  5. generic pointer :- A pointer to void is said to be generic pointer.The most important feature of generic pointer is that it can store the address of any kind of variable may be int,char,float double etc. But int *p can store only the address of integer variable.like char *p can store only the address of char variable etc.

    ReplyDelete
  6. Far Pointer :- A pointer created in one segment allcating memory from another segment is called far pointer.
    exp :- char far *p=OxB8000000;
    They are no more used bcoz of a lot of issues associated with the turbo C compiler .There is no near,far or huge in gcc compiler.

    ReplyDelete
  7. Apart from complex code there is no disadvantage in using a pointer.

    ReplyDelete
  8. we have heard that pointers can hold the address of integers ,characters ,floats etc. also a pointer can hold the address of function exp (*p)();In using this prototype is compulsory.

    ReplyDelete
  9. Array of intergers int a[5];
    array of characters char str[40];

    Array of addresses are called as array of pointers.
    char *names[89];
    It has a numerous advantages over 2D array if used with the strings .

    ReplyDelete
  10. It is 100% true to say that "Every array name and function names are constant pointers".

    int a[5];
    int * const p=(int *)malloc(5 * sizeof(int));

    The above two statements dont have exactly a single difference.

    ReplyDelete