Sunday, 5 February 2012

C Linux interview questions and answers


C Linux interview questions and answers



(1)What will be output if you will execute following program by gcc compiler in Linux?






#include

int main(){

    int a=5;

    printf("%d %d %d",a++,a++,++a);

    return 0;

}




Output:



In LINUX GCC compiler



7 6 8



In TURBO C

7 6 6




Hints: In Turbo c parameter is passed from right to left in printf function but not in the

No comments:

Post a Comment