Which one of the following string will print by this program? [code] #include<stdio.h> #include<pthread.h> int main() {

Which one of the following string will print by this program?
Code:
    #include<stdio.h>
    #include<pthread.h>
    int main()
    {
        printf("123hoidap\n");
        pthread_exit("Bye");
        printf("Linux");
        return 0;
    }
A. Linux
B. 123hoidap
C. Bye
D. None of the mentioned
 
Answer: b
Explanation: The main thread exits before printing the string “Linux”;
Output:
[root@localhost 123hoidap]# gcc -o san san.c -lpthread
[root@localhost 123hoidap]# ./san
This section on tricky C interview questions focuses on “Mathematical Functions”. One shall practice these tricky questions to improve their C programming skills needed for various interviews (campus interviews, walkin interviews, company interviews), placements, entrance exams and other competitive exams. These questions can be attempted by anyone focusing on learning C Programming language. They can be a beginner, fresher, engineering graduate or an experienced IT professional. Our C questions come with detailed explanation of the answers which helps in better understanding of C concepts.
Here is a listing of C interview questions on “Mathematical Functions” along with answers, explanations and/or solutions:
 

Tìm kiếm

Back
Top