055. Technical interview question: Give the output of following code

int sq(int);
int main(){
    int a=1,x;
    x = sq (++a) + sq(a++) + sq(a++);
    printf("%d", x);
return 0;
int sq(int num){
    return num * num;
Watch video explanation for this technical question

Leave a Reply

Your email address will not be published. Required fields are marked *