[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

C Programming :: Variables & Data Types - Discussion

Home > C Programming > Variables & Data Types > MCQs Questions Discussion

11 / 51

What will be output of the following "c" code?

#include<stdio.h>
#include<conio.h>
float avg(float,float,float);
void main(){
    float p=1,q=2,r=-2,a;
    a=avg(p,(q=4,r=-12,q),r);
    printf("%f",a); 
}
float avg(float x,float y,float z){
    return (x+y+z)/3;
}

A0.111111

B1

C-0.777777

D-1

ECompilation error

Answer: Option (Login/Signup)

Show Explanation

Asked In ::

Post Your Answer Here:     

No Discussion on this question yet!