Wednesday 14 January 2009

c coding questions and answer


Best questions of preprocessor with answer



(1)

#include

#define division 10\3

int main(){

    printf("%d",division); 

    return 0;   

}



What will be output if you compile and execute the above code?

(a)3

(b)4

(c)103

(d)Compiler error



(2)

#include

void display();

void calculate();

#pragma startup calculate

#pragma  exit display

int main(){

    printf("

No comments:

Post a Comment