+ Reply to Thread
Results 1 to 10 of 10
Aptitude Test
  1. #1
    Fuchcha FaaDoO Engineer
    City
    Kolkata
    Join Date
    Jul 2012
    Gender
    Male
    Posts
    3
    Likes Gifted
    4
    Likes Received
    3
    Groans Gifted
    0
    Groans Received
    0

    Pdf 32 C programming interview questions and answers [pdf]

    C programming interview questions and answers [pdf]


    Sponsored Ads


    Frequently asked in interview ...just a pdf..watch it out
    Attached Files for Direct Download
    File Name:
    File Size:
    127.3 KB
    Total Downloads:
    8401
    * Click on the 'file icon' or 'file name' to start downloading


  2. The Following 3 Users LIKE this post from deepan sarkar:

    amrutab (27th October 2012), Nasrin (10th July 2012), saikrishnac7 (12th November 2012)

  3. #2
    Fuchcha FaaDoO Engineer
    City
    Nasik
    Join Date
    Jul 2012
    Gender
    Male
    Posts
    1
    Likes Gifted
    0
    Likes Received
    3
    Groans Gifted
    0
    Groans Received
    0

    Re: C programming interview questions and answers [pdf]

    it is very nice

  4. The Following 3 Users LIKE this post from prashant kannurkar:

    deepan sarkar (1st November 2012), Parvathy unni (18th August 2012), saikrishnac7 (12th November 2012)

  5. #3
    Fuchcha FaaDoO Engineer
    City
    Kolkata
    Join Date
    Jul 2012
    Gender
    Male
    Posts
    3
    Likes Gifted
    4
    Likes Received
    3
    Groans Gifted
    0
    Groans Received
    0

    Re: C programming interview questions and answers [pdf]

    thanx brother
    .............................................................

  6. #4
    Fuchcha FaaDoO Engineer
    City
    Chennai
    Join Date
    Jul 2011
    Gender
    Male
    Posts
    2
    Likes Gifted
    0
    Likes Received
    1
    Groans Gifted
    0
    Groans Received
    0

    Re: C programming interview questions and answers [pdf]

    thanqs for the pdf bro

  7. The Following User LIKES this post from cutzas:

    deepan sarkar (1st November 2012)

  8. #5
    Fuchcha FaaDoO Engineer
    City
    Kurnool
    Join Date
    Oct 2012
    Gender
    Male
    Posts
    1
    Likes Gifted
    0
    Likes Received
    1
    Groans Gifted
    0
    Groans Received
    0

    Dreamweaver 32 Re: C programming interview questions and answers [pdf]

    thanks
    thanks
    thanks
    thanks
    thanks
    thanks

  9. The Following User LIKES this post from anumul:

    deepan sarkar (1st November 2012)

  10. #6
    Fuchcha FaaDoO Engineer
    City
    Lucknow
    Join Date
    Oct 2012
    Gender
    Female
    Posts
    2
    Likes Gifted
    1
    Likes Received
    1
    Groans Gifted
    0
    Groans Received
    0

    Re: C programming interview questions and answers [pdf]

    Thanku so much.

  11. The Following User LIKES this post from sswati:

    deepan sarkar (1st November 2012)

  12. #7
    Fuchcha FaaDoO Engineer
    City
    Bagdogra
    Join Date
    Nov 2012
    Gender
    Male
    Posts
    9
    Likes Gifted
    0
    Likes Received
    7
    Groans Gifted
    0
    Groans Received
    0

    Re: C programming interview questions and answers [pdf]

    Thanks for sharing. I thought I would add another tip:
    (1) If static storage in c will not work then what problem will you face?
    (2) If extern storage in c will not work then what problem will you face?
    (3) Why we cannot initialize extern variables?
    (4) What is trigraph in C?
    (5) Why char data type can store two characters at a time?
    (6) What is prototype of printf function?
    103 interview questions and answers ( free pdf download)

  13. #8
    Fuchcha FaaDoO Engineer
    City
    Pune
    Join Date
    Oct 2012
    Gender
    Male
    Posts
    1
    Likes Gifted
    0
    Likes Received
    0
    Groans Gifted
    0
    Groans Received
    0

    Re: C programming interview questions and answers [pdf]

    thanks bro..it is very helpful....

  14. #9
    Fuchcha FaaDoO Engineer
    City
    Jaipur
    Join Date
    Jan 2013
    Gender
    Male
    Posts
    1
    Likes Gifted
    0
    Likes Received
    0
    Groans Gifted
    0
    Groans Received
    0

    Re: C programming interview questions and answers [pdf]

    good study material

  15. #10
    Active FaaDoO Engineer
    City
    Bangalore
    Join Date
    Mar 2012
    Gender
    Male
    Posts
    132
    Likes Gifted
    3
    Likes Received
    28
    Groans Gifted
    1
    Groans Received
    0

    Re: C programming interview questions and answers [pdf]

    hey frnts,

    Some programming questions:

    1. Consider the following program:


    #include <stdio.h>
    #include <setjmp.h>


    static jmp_buf buf;


    int main(void)
    {
    volatile int b = 3;


    if (setjmp(buf) != 0)
    {
    printf("%d\n", b);
    exit(0);
    }
    b = 5;
    longjmp(buf, 1);
    }
    What is the output of this program?


    (a) 3
    (b) 5
    (c) 0
    (d) none of the above




    2. Consider the following program:


    #include <stdio.h>


    int main(void)
    {
    struct node
    {
    int a;
    int b;
    int c;
    };
    struct node s = { 3, 5, 6 };
    struct node *pt = &s;


    printf("%d\n", *(int*)pt);


    return 0;
    }
    What is the output of this program?


    (a) 3
    (b) 5
    (c) 6
    (d) 7




    3. Consider the following code segment:


    int foo(int x, int n)
    {
    int val = 1;


    if (n > 0)
    {
    if (n % 2 == 1)
    val *= x;


    val *= foo(x * x, n / 2);
    }
    return val;
    }
    What function of x and n is computed by foo?


    (a) xn
    (b) x × n
    (c) nx
    (d) none of the above






    4. Consider the following program:


    #include <stdio.h>


    int main(void)
    {
    int a[5] = { 1, 2, 3, 4, 5 };
    int *ptr = (int*)(&a + 1);


    printf("%d %d\n", *(a + 1), *(ptr - 1));


    return 0;
    }
    What is the output of this program?


    (a) 2 2
    (b) 2 1
    (c) 2 5
    (d) none of the above






    5. Consider the following program:


    #include <stdio.h>


    void foo(int[][3]);


    int main(void)
    {
    int a[3][3] = { {1, 2, 3}, {4, 5, 6}, {7, 8, 9} };


    foo(a);
    printf("%d\n", a[2][1]);


    return 0;
    }


    void foo(int b[][3])
    {
    ++b;
    b[1][1] = 9;
    }
    What is the output of this program?


    (a) 8
    (b) 9
    (c) 7
    (d) none of the above




    6. Consider the following program:


    #include <stdio.h>


    int main(void)
    {
    int a, b, c, d;
    a = 3;
    b = 5;
    c = a, b;
    d = (a, b);


    printf("c=%d ", c);
    printf("d=%d\n", d);


    return 0;
    }
    What is the output of this program?


    (a) c=3 d=3
    (b) c=5 d=3
    (c) c=3 d=5
    (d) c=5 d=5






    7. Consider the following program:


    #include <stdio.h>


    int main(void)
    {
    int a[][3] = {1, 2, 3, 4, 5, 6};
    int (*ptr)[3] = a;


    printf("%d %d ", (*ptr)[1], (*ptr)[2]);


    ++ptr;
    printf("%d %d\n", (*ptr)[1], (*ptr)[2]);


    return 0;
    }
    What is the output of this program?


    (a) 2 3 5 6
    (b) 2 3 4 5
    (c) 4 5 0 0
    (d) none of the above






    8. Consider the following code segment:


    #include <stdlib.h>


    int *f1(void)
    {
    int x = 10;
    return &x;
    }


    int *f2(void)
    {
    int *ptr;
    *ptr = 10;
    return ptr;
    }


    int *f3(void)
    {
    int *ptr;
    ptr = malloc(sizeof *ptr);
    return ptr;
    }
    Which of these functions uses pointers incorrectly?


    (a) f3 only
    (b) f1 and f3
    (c) f1 and f2
    (d) f1, f2, and f3




    9. Consider the following program:


    #include <stdio.h>


    int main(void)
    {
    int i = 3;
    int j;


    j = sizeof(++i + ++i);


    printf("i=%d j=%d\n", i, j);


    return 0;
    }
    What is the output of this program on an implementation where int occupies 2 bytes?


    (a) i=4 j=2
    (b) i=3 j=2
    (c) i=5 j=2
    (d) the behavior is undefined




    10. Consider the following program:


    #include <stdio.h>


    void f1(int*, int);
    void f2(int*, int);
    void (*p[2])(int*, int);


    int main(void)
    {
    int a = 3;
    int b = 5;


    p[0] = f1;
    p[1] = f2;


    p[0](&a, b);
    printf("%d %d ", a, b);


    p[1](&a, b);
    printf("%d %d\n", a, b);


    return 0;
    }


    void f1(int *p, int q)
    {
    int tmp = *p;
    *p = q;
    q = tmp;
    }


    void f2(int *p, int q)
    {
    int tmp = *p;
    *p = q;
    q = tmp;
    }
    What is the output of this program?


    (a) 5 5 5 5
    (b) 3 5 3 5
    (c) 5 3 3 5
    (d) none of the above






    11. Consider the following program:


    #include <stdio.h>


    void e(int);


    int main(void)
    {
    int a = 3;
    e(a);


    putchar('\n');
    return 0;
    }


    void e(int n)
    {
    if (n > 0)
    {
    e(--n);
    printf("%d ", n);
    e(--n);
    }
    }
    What is the output of this program?


    (a) 0 1 2 0
    (b) 0 1 2 1
    (c) 1 2 0 1
    (d) 0 2 1 1






    12. Consider the following code segment:


    typedef int (*test)(float*, float*);
    test tmp;
    What is the type of tmp?


    (a) function taking two pointer-to-float arguments and returning pointer to int
    (b) pointer to int
    (c) pointer to function taking two pointer-to-float arguments and returning int
    (d) none of the above






    13. Consider the following program:


    #include <stdio.h>


    int main(void)
    {
    char p;
    char buf[10] = {1, 2, 3, 4, 5, 6, 9, 8};


    p = (buf + 1)[5];
    printf("%d\n", p);


    return 0;
    }
    What is the output of this program?


    (a) 5
    (b) 6
    (c) 9
    (d) none of the above






    14. Consider the following program:


    #include <stdio.h>


    void f(char**);


    int main(void)
    {
    char *argv[] = { "ab", "cd", "ef", "gh", "ij", "kl" };
    f(argv);


    return 0;
    }


    void f(char **p)
    {
    char *t;


    t = (p += sizeof(int))[-1];


    printf("%s\n", t);
    }
    What is the output of this program on an implementation where int and all pointer types occupy 2 bytes?


    (a) ab
    (b) cd
    (c) ef
    (d) gh






    15. Consider the following program:


    #include <stdarg.h>
    #include <stdio.h>


    int ripple(int n, ...)
    {
    int i, j, k;
    va_list p;


    k = 0;
    j = 1;
    va_start(p, n);


    for (; j < n; ++j)
    {
    i = va_arg(p, int);
    for (; i; i &= i - 1)
    ++k;
    }
    va_end(p);
    return k;
    }


    int main(void)
    {
    printf("%d\n", ripple(3, 5, 7));
    return 0;
    }
    What is the output of this program?


    (a) 7
    (b) 6
    (c) 5
    (d) 3






    16. Consider the following program:


    #include <stdio.h>


    int counter(int i)
    {
    static int count = 0;
    count = count + i;
    return count;
    }


    int main(void)
    {
    int i, j;


    for (i = 0; i <= 5; i++)
    j = counter(i);


    printf("%d\n", j);
    return 0;
    }
    What is the output of this program?


    (a) 10
    (b) 15
    (c) 6
    (d) 7


 

Similar Threads

  1. Ten Tough Questions For An Interview-Interview Questions & Answers Pdf Download
    By nanny in forum Communication Skills for Engineers/ Personality Development zone/ Interviews Tips & Tricks
    Replies: 4
    Latest: 28th January 2013, 08:50 PM
  2. The Best Answers to Tough Interview Questions - How to face interview tricks
    By javitha in forum Communication Skills for Engineers/ Personality Development zone/ Interviews Tips & Tricks
    Replies: 17
    Latest: 30th December 2012, 08:08 PM
  3. 50 common interview questions and answers
    By anurag gupta in forum Communication Skills for Engineers/ Personality Development zone/ Interviews Tips & Tricks
    Replies: 8
    Latest: 19th December 2012, 12:04 PM
  4. C And C++ Interview Questions And Answers PDF Download
    By priyasweet in forum Software & IT Industry jobs in India & IT Sector placement papers
    Replies: 9
    Latest: 20th November 2012, 07:58 AM
  5. 50 Important Interview Questions and their answers...
    By rajaram321 in forum Communication Skills for Engineers/ Personality Development zone/ Interviews Tips & Tricks
    Replies: 2
    Latest: 28th January 2012, 10:05 AM

Tags for this Thread

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may post attachments
  • You may edit your posts
 
Search Engine Optimisation provided by DragonByte SEO v1.1.7 (Lite) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd. Runs best on HiVelocity Hosting.