My Courses
C Programming Questions and Answers – Switch Statements – 2
C Programming Questions and Answers – Switch Statements – 2 1. What is the output of this C code? #include <stdio.h> const int a = 1, b = 2; int main() { int x = 1; switch (x) { case a: printf(“yes “); case b: printf(“no\n”); break; } } a) yes no b) yes c)…
C Programming Questions and Answers – Switch Statements – 1
C Programming Questions and Answers – Switch Statements – 1 1. What is the output of this C code(when 1 is entered)? #include <stdio.h> void main() { double ch; printf(“enter a value btw 1 to 2:”); scanf(“%lf”, &ch); switch (ch) { case 1: printf(“1”); break; case 2: printf(“2”); break; } } a) Compile time error…
C Programming Questions and Answers – If-then-else Statements – 2
C Programming Questions and Answers – If-then-else Statements – 2 1. What is the output of this C code? #include <stdio.h> int main() { int x = 1; if (x > 0) printf(“inside if\n”); else if (x > 0) printf(“inside elseif\n”); } a) inside if b) inside elseif c) inside if inside elseif d) Compile…
C Programming Questions and Answers – If-then-else Statements – 1
C Programming Questions and Answers – If-then-else Statements – 1 1. The output of the code below is #include <stdio.h> void main() { int x = 5; if (x < 1) printf(“hello”); if (x == 5) printf(“hi”); else printf(“no”); } a) hi b) hello c) no d) None of the mentioned 2. The output of…
C Programming Questions and Answers – Precedence and Order of Evaluation – 6
C Programming Questions and Answers – Precedence and Order of Evaluation – 6 1. Which of the following are unary operators? a) sizeof b) – c) ++ d) All of the mentioned 2. Where in C the order of precedence of operators do not exist? a) Within conditional statements, if, else b) Within while,…
C Programming Questions and Answers – Precedence and Order of Evaluation – 5
C Programming Questions and Answers – Precedence and Order of Evaluation – 5 This section on C interview questions and answers focuses on “Precedence and Order of Evaluation”. One shall practice these interview questions to improve their C programming skills needed for various interviews (campus interviews, walkin interviews, company interviews), placements, entrance exams and other…
C Programming Questions and Answers – Precedence and Order of Evaluation – 4
C Programming Questions and Answers – Precedence and Order of Evaluation – 4 C helps anyone preparing for Wipro and other companies C interviews. One should practice these 1000+ interview questions and answers continuously for 2-3 months to clear Wipro interviews on C Programming language. Here is a listing of C programming interview questions on…
C Programming Questions and Answers – Precedence and Order of Evaluation – 3
C Programming Questions and Answers – Precedence and Order of Evaluation – 3 This section on online C test focuses on “Precedence and Order of Evaluation”. One shall practice these test questions to improve their C programming skills needed for various interviews (campus interviews, walkin interviews, company interviews), placements, entrance exams and other competitive exams.…
C Programming Questions and Answers – Precedence and Order of Evaluation – 2
C Programming Questions and Answers – Precedence and Order of Evaluation – 2 Sanfoundry’s 1000+ Interview Questions & Answers on C helps anyone preparing for VMware and other companies C interviews. One should practice these 1000+ interview questions and answers continuously for 2-3 months to clear VMware interviews on C Programming language. Here is a…
C Programming Questions and Answers – Precedence and Order of Evaluation – 1
C Programming Questions and Answers – Precedence and Order of Evaluation – 1 This section on C language interview questions and answers focuses on “Precedence and Order of Evaluation”. One shall practice these interview questions to improve their C programming skills needed for various interviews (campus interviews, walkin interviews, company interviews), placements, entrance exams and…