What will be the output of the following C code? [code] #include <stdio.h> int main() { printf("before continue ");

What will be the output of the following C code?
Code:
    #include <stdio.h>
    int main()
    {
        printf("before continue ");
        continue;
        printf("after continue\n");
    }
A. Before continue after continue
B. Before continue
C. After continue
D. Compile time error
 
Answer: d
Explanation: None.
This section on basic C questions focuses on “Scope of a Variable”. One shall practice these basic interview 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 interview questions come with detailed explanation of the answers which helps in better understanding of C concepts.
Here is a listing of basic C questions on “Scope of a Variable” along with answers, explanations and/or solutions:
 

Tìm kiếm

Back
Top