Posted in: GK

Programming C

Results

-

HD Quiz powered by harmonic design

#1. What is the correct way to declare a constant in C?

#2. What will happen if you try to compile and run the following code? #include int main() { int a = 5; if(a = 0) printf("Hello"); else printf("World"); return 0; }

#3. What will be the output of the following code? #include int main() { int a = 5, b = 2; float result; result = a / b; printf("%.2f", result); return 0; }

#4. What is the data type of the value returned by the sizeof operator?

#5. Which of the following loop is guaranteed to execute at least once?

See also  Java Quiz_1

#6. Which of the following functions is used to dynamically allocate memory in C?

#7. What is the output of the following C code? #include int main() { int x = 10; printf("%d", x++); return 0; }

#8. Which of the following is used to get the remainder of a division in C?

#9. Which of the following is a correct syntax to declare a pointer in C?

Finish

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to Top