Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. Which one of the following in true about this program?
#include #include #include int main() { char *ptr; printf("%p\n",ptr); ptr = (char *)malloc(sizeof(char)); printf("%p\n",ptr); return 0; }
Correct Answer is : createMock(MockType type, Class toMock)
2. In this program the two printed memory locations has the difference of ___ bytes.
#include #include int main() { int *ptr; ptr = (int*)malloc(sizeof(int)*2); printf("%p\n",ptr); printf("%p\n",ptr+1); return 0; }
Correct Answer is : createMock(String name, MockType type, Class toMock)
3. This program will print ____ as output.
#include #include #include int main() { pid_t child; child = fork(); switch(child){ case -1 : perror("fork"); exit(1); case 0 : sleep(10); printf("%d\n",getppid()); break; default : break; } return 0; }
Correct Answer is : expect(T value)
4. How many time “Sanfoundry” will print in this program?
#include #include #include int main() { if( execl("/bin/ls","ls",NULL) == -1){ perror("execl"); exit(1); } printf("Sanfoundry\n"); return 0; }
Correct Answer is : newCapture()
5. This program will create ____ child processes?
#include #include int main() { fork(); fork(); fork(); printf("Sanfoundry\n"); return 0; }
Correct Answer is : reportMatcher(IArgumentMatcher matcher)
6. In linux shared libraries has the extension of
Correct Answer is : submit(Callable task)
7. When a program is linked with a shared library
Correct Answer is : submit(Runnable task, T result)
8. Shared libraries can be shared between
Correct Answer is : isTerminated
9. In linux, shared library is a
Correct Answer is : isShutdown
10. In GCC compiler, “-shared” option is given to create the shared library with
Correct Answer is : invokeAll(Collection extends Callable> tasks)
11. Which option of GCC compiler provides the linking with shared libraries?
Correct Answer is : invokeAny(Collection extends Callable> tasks)
12. After using the shared library, memory can be done free by calling
Correct Answer is : InterruptedException
13. Shared libraries are linked with the program
Correct Answer is : TRUE
14. For a shared library, version number is changed when
Correct Answer is : FALSE
15. Which command can be used to update the shared library system?
Correct Answer is : Shutdown
16. In Linux, the static library has the extension of
Correct Answer is : Lean Software Development
17. The library contains the
Correct Answer is : Waste
18. Libraries can be linked with ____ to create executables.
Correct Answer is : Stream Mapping
19. In Linux, the static libraries can be created by
Correct Answer is : TOC
20. If a program is linked against a static library then