Miscellaneous Company Exam
Company
Programming
Program
What is the type of the variable b in the following declaration? #define FLOATPTR float*
FLOATPTR a,b;
a) float b) float pointer c) mt d) mt pointer
In the following code;
#include
main()
{
FILE *fp;
fp= fopen(”trial”,”r”);
}
fp points to:
a) The first character in the file.
b) A structure which contains a “char” pointer which points to the first character in the file. c) The name of the file. d) None of the above.
If the program (myprog) is run from the command line as myprog 1 2 3 , What would be the output?
main(int argc, char sargv[))
int I,j=0;
for(i=O;i
Read Solution (Total 1)
-
- 1) b) float pointer
FLOATPTR ll be expanded in the line FLOATPTR a,b; (ie) float* a, b;
2) b) A structure which contains a “char” pointer which points to the first character in the file.
FILE is a built-in structure which contains a char pointer variable... that char pointer ll point to the first char in the file named "trial"
- 10 years agoHelpfull: Yes(13) No(0)
Miscellaneous Company Exam Other Question