Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Library Functions Questions
What will the function rewind() do?
Which standard library function will you use to find the last occurance of a character in a string in C?
Input/output function prototypes and macros are defined in which header file?
Can you use the fprintf() to display the output on the screen?
What is stderr?
What is the purpose of fflush() function.
What will the function randomize() do in Turbo C under DOS?
Does there any function exist to convert the int or float to a string?
What will be the output of the program? #include<stdio.h> #include<string.h> int main() { char dest[] = {97, 97, 0}; char src[] = "aaa"; int i; if((i = memcmp(dest, src, 2))==0) printf("Got it"); else printf("Missed"); return 0; }
What will be the output of the program? #include<stdio.h> int main() { int i; i = scanf("%d %d", &i, &i); printf("%d\n", i); return 0; }
What will be the output of the program? #include<stdio.h> #include<math.h> int main() { float i = 2.5; printf("%f, %d", floor(i), ceil(i)); return 0; }
What will function gcvt() do?
What will be the output of the program? #include<stdio.h> int main() { int i; i = printf("How r u\n"); i = printf("%d\n", i); printf("%d\n", i); return 0; }
What will be the output of the program? #include<stdio.h> int main() { int i; char c; for(i=1; i<=5; i++) { scanf("%c", &c); /* given input is 'b' */ ungetc(c, stdout); printf("%c", c); ungetc(c, stdin); } return 0; }
What will be the output of the program? #include<stdio.h> int main() { int i; char c; for(i=1; i<=5; i++) { scanf("%c", &c); /* given input is 'a' */ printf("%c", c); ungetc(c, stdin); } return 0; }
What will be the output of the program? #include<stdio.h> #include<stdlib.h> int main() { char *i = "55.555"; int result1 = 10; float result2 = 11.111; result1 = result1+atoi(i); result2 = result2+atof(i); printf("%d, %f", result1, result2); return 0; }