• HOME
  • QUIZ
  • CONTACT US
EXAMIANS
  • COMPUTER
  • CURRENT AFFAIRS
  • ENGINEERING
    • Chemical Engineering
    • Civil Engineering
    • Computer Engineering
    • Electrical Engineering
    • Mechanical Engineering
  • ENGLISH GRAMMAR
  • GK
  • GUJARATI MCQ

C PROGRAMMING QUIZ

What will be the correct output of the following program?#include<string.h>void main(){ char str[] = "C EXAMINATION", rev[17]; int i = strlen(str), j=0; for( ; i>=0; rev[j++] = str[i--]) rev[j] = str[j] ; puts(rev);}

TRUE ANSWER : ?
YOUR ANSWER : ?

Determine Output:void main(){ char *p; p="%dn"; p++; p++; printf(p-2, 300);}

TRUE ANSWER : ?
YOUR ANSWER : ?

short testarray[4][3] = { {1}, {2,3}, {4,5,6}};printf("%d", sizeof(testarray));Assuming a short is two bytes long, what will be printed by the above code?

TRUE ANSWER : ?
YOUR ANSWER : ?

What will be the final value of the digit?void main(){ int digit = 0; for( ; digit <= 9; ) digit++; digit *= 2; --digit;}

TRUE ANSWER : ?
YOUR ANSWER : ?

Determine Output:main(){ char *str1 = "abcd"; char str2[] = "abcd"; printf("%d %d %d", sizeof(str1), sizeof(str2), sizeof("abcd"));}

TRUE ANSWER : ?
YOUR ANSWER : ?

What is the result of compiling and running this code?main(){ char string[] = "Hello World"; display(string);}void display(char *string){ printf("%s", string);}

TRUE ANSWER : ?
YOUR ANSWER : ?

What will be output if you will compile and execute the following c code?#include<stdio.h>#define max 5void main(){ int i = 0; i = max++; printf("%d", i++);}

TRUE ANSWER : ?
YOUR ANSWER : ?

Which of the following correctly accesses the seventh element stored in arr, an array with 100 elements?

TRUE ANSWER : ?
YOUR ANSWER : ?

What will be the output of the following program?void main(){ int a, b, c, d; a = 3; b = 5; c = a, b; d = (a, b); printf("c=%d d=%d", c, d);}

TRUE ANSWER : ?
YOUR ANSWER : ?

What will be the output of this program on an implementation where int occupies 2 bytes?#include <stdio.h>void main(){ int i = 3; int j; j = sizeof(++i + ++i); printf("i=%d j=%d", i, j);}

TRUE ANSWER : ?
YOUR ANSWER : ?
MORE MCQ

QUIZ STATS

  • 0
  • 0

DOWNLOAD APP

  • APPLE
    from app store
  • ANDROID
    from play store

SEARCH

LOGIN HERE


  • GOOGLE

FIND US

  • 1.70K
    FOLLOW US
  • EXAMIANSSTUDY FOR YOUR DREAMS.
  • SUPPORT :SUPPORT EMAIL ACCOUNT : examians@yahoo.com

OTHER WEBSITES

  • GUJARATI MCQ
  • ACCOUNTIANS

QUICK LINKS

  • HOME
  • QUIZ
  • PRIVACY POLICY
  • DISCLAIMER
  • TERMS & CONDITIONS
  • CONTACT US
↑