Tin Học >> Lập trình >> C
|| C#
C++
Visual Basic
Visual Foxpro
C
Java
Pascal
Thiết Kế Web
ASP.NET
XML
CSS
PHP
Có 115 bài trong 12 trang (10 bài/trang) và bạn đang ở trang 3.
Point out the error in the following program. #include int main() { fprintf("IndiaBIX"); printf("%.ef", 2.0); return 0; } A. Error: unknown value in printf() statement. B. Error: in fprintf() statement. C. No error and prints "IndiaBIX" D. No error and prints "2.0"...... Point out the error in the following program. int main() { char str1[] = "Learn through IndiaBIX\0.com", str2[120]; char *p; p = (char*) memccpy(str2, str1, 'i', strlen(str1)); *p = '\0'; printf("%s", str2); return 0; } A. Error: in memccpy statement B. Error: invalid pointer conversion C. Error: invalid variable declaration...... What will be the output of the program? #include int main() { int i; i = printf("How r u\n"); i = printf("%d\n", i); printf("%d\n", i); return 0; } A. How r u 7 2 B. How r u 8 2 C. How r u 1 1 D. Error: cannot assign printf to variable...... What will be the output of the program? #include #include int main() { float i = 2.5; printf("%f, %d", floor(i), ceil(i)); return 0;.... Input/output function prototypes and macros are defined in which header file? A. conio.h B. stdlib.h C. stdio.h D. dos.h...... Which standard library function will you use to find the last occurance of a character in a string in C? A. strnchar() B. strchar() C. strrchar() D. strrchr()..... What is stderr ? A. standard error B. standard error types C. standard error streams.... It is not necessary to typecast the address returned by malloc(). A. True B. False.... We can modify the pointers "source" as well as "target". A. True B. False.... Function can return a floating point number. A. True B. False...... Are the following declarations same? char far *far *scr; char far far** scr; A. Yes B. No... What will be the output of the program? #include typedef unsigned long int uli; typedef uli u; int main() { uli a; u b = -1; a = -1; printf("%lu, %lu", a, b); return 0; } A. 4343445454, 4343445454 B. 4545455434, 4545455434 C. 4294967295, 4294967295 D. Garbage values........ What will be the output of the program in DOS (Compiler - Turbo C)? #include double i; int main() { (int)(float)(char) i; printf("%d",sizeof(i));......... What do the following declaration signify? int *f(); A. f is a pointer variable of function type. B. f is a function returning pointer to an int. C. f is a function pointer. D. f is a simple declaration of pointer variable........ What do the following declaration signify? void (*cmp)(); A. cmp is a pointer to an void function type. B. cmp is a void type pointer function. C. cmp is a function that return a void pointer. D. cmp is a pointer to a function which returns void ........ It is necessary to call the macro va_end if va_start is called in the function. A. Yes B. No.... The macro va_arg is used to extract an argument from the fixed micro argument list and advance the pointer to the next argument. A. Yes B. No.... Declare the following statement? "An array of three pointers to chars". A. char *ptr[3](); B. char *ptr[3]; C. char (*ptr[3])(); D. char **ptr[3];....... A function that receives variable number of arguments should use va_arg() to extract arguments from the variable argument list. A. True B. False...... For a function receives variable number of arguments it is necessary that the function should receive at least one fixed argument. A. True B. False.... A function that receives variable number of arguments should use va_arg() to extract the last argument from the variable argument list. A. True B. False.... What will be the output of the program? #include #include void fun1(int num, ...); void fun2(int num, ...); int main() { fun1(1, "Apple", "Boys", "Cats", "Dogs"); fun2(2, 12, 13, 14); return 0; } void fun1(int num, ...) { char *str; va_list ptr; va_start(ptr, num); str = va_arg(ptr, char *); printf("%s ", str); } void fun2(int num, ...) { va_list ptr; va_start(ptr, num); num = va_arg(ptr, int); printf("%d", num); } A. Dogs 12 B. Cats 14 C. Boys 13 D. Apple 12...... malloc() returns a float pointer if memory is allocated for storing float's and a double pointer if memory is allocated for storing double's. A. True B. False..... malloc() returns a NULL if it fails to allocate the requested memory. A. True B. False.... malloc() allocates memory from the heap and not from the stack. A. True B. False.... |