Loading, please wait...

C Programming Multiple Choice Questions And Answers

Search here for MCQs

Are you preparing for the next job interviews? If yes, trust me this post will help you also we'll suggest you check out a big collection for Programming Full Forms that may help you in your interview:

List of Programming Full Forms 

51. Find out the Output

int fun(char *str1) { char *str2 = str1; while(*++str1); return (str1-str2); } int main() { char *str = "geeksforgeeks"; printf("%d", fun(str)); getchar(); return 0; }

52. What is the output?

#include int main() { int i = 1; if (i++ && (i == 1)) printf("Yes\n"); else printf("No\n"); }
  • Depends on compiler
  • Yes
  • No
  • Depends on standard

53. Find out the error

#include int main() { display(); return 0; } void display() { printf("IndiaBIX.com"); }
  • display() doesn't get invoked
  • display() is called before it is defined
  • None of these
  • No error

54. Find out the Output

int main() { int a = 10.5; printf("%d",a); return 0; }
  • Output : 10
  • Output : 10.5
  • Output : 0
  • Output : 11

55. Find out the Output

int main() { char arr[5]="The tutoriallinks.com"; printf("%s",arr); return 0; }
  • The tutoriallinks.com
  • The tu
  • The
  • Compilation error