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

#include<stdio.h>
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 all videos like this

Leave a Reply

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