What will be the output of the following C++ code in text file?
Posted: Wed Jul 13, 2022 7:53 pm
#include <stdio.h> int main () { FILE * p; char buffer[] = { 'x' , 'y' , 'z' }; p = fopen ( "myfile.txt" , "wb" ); fwrite (buffer , 1 , sizeof(buffer) , p ); fclose (p); return 0; }
a) xyz
b) zyx
c) yxz
d) yyx
a) xyz
b) zyx
c) yxz
d) yyx