C Language
Description: Test your C skill in programming language for mca entrance and campus placements by free online preparation and practice paper tests | |
Number of Questions: 11 | |
Created by: Shaka Gupte | |
Tags: Basics C Skills Advanced C Skills C Skills Test Java Skill Test DBMS Oracle PHP Computer Application Placement Papers MCA Entrance BCA BSC Programming Fundamentals of Computer Programming AP General term of an Arithmetic Progression Odd One Out Classification |
Which one of the following is valid for opening a read-only ASCII file?
f = fopen( filename, "r" ); Referring to the code above, what is the proper definition for the variable f?
If there is a need to see output as soon as possible, what function will force the output from the buffer into the output stream?
Short int x; /* assume x is 16 bits in size */, what is the maximum number that can be printed using printf(%d , x), assuming that x is initialized as shown above?
Which one of the following can be used to test arrays of primitive quantities for strict equality under Standard C?
void crash (void)
{
printf(got here);
*((char *) 0) = 0;
}
The function crash(), defined above, triggers a fault in the memory management hardware for many architectures. Which one of the following explains why got here may not be printed before the crash?
char * dwarves [] = { Sleepy, Dopey Doc, Happy, Grumpy Sneezy, Bashful, }; How many elements does the array declared above contain? Assume the C compiler employed strictly complies with the requirements of Standard C.
char *buffer = 0123456789;
char *ptr = buffer;
ptr += 5;
printf( %s, ptr );
printf( %s, buffer );
What will be printed when the sample code above is executed?
What number is equivalent to -4e3?
int debug (const char * fmt, ...) { extern FILE * logfile; va_list args; assert(fmt); args = va_arg(fmt, va_list); return vfprintf(logfile, fmt, args); } The function debug(), defined above, contains an error. Which one of the following describes it?
How does variable definition differ from variable declaration?