• 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

C Programming
Determine Output:void main(){ char a[]="12345"; int i = strlen(a); printf("%d", ++i);}

None of These
5
6
7

ANSWER DOWNLOAD EXAMIANS APP

C Programming
Determine output:#include void main(){ char *p = NULL; char *q = 0; if(p) printf(" p "); else printf("nullp"); if(q) printf("q"); else printf(" nullq");}

x nullq where x can be p or nullp depending on the value of NULL
p q
nullp nullq
Depends on the compiler

ANSWER DOWNLOAD EXAMIANS APP

C Programming
Determine Output:void main(){ struct xx { int x=3; char name[] = "hello"; }; struct xx *s = malloc(sizeof(struct xx)); printf("%d", s->x); printf("%s", s->name); }

Linking error
Compiler Error
3 hello
None of these

ANSWER DOWNLOAD EXAMIANS APP

C Programming
What will be the output of the following code?void main(){ int a[10]; printf("%d %d", a[-1], a[12]);}

Garbage value 0
Code will not compile
0 Garbage Value
Garbage vlaue Garbage Value
0 0

ANSWER DOWNLOAD EXAMIANS APP

C Programming
The address operator &, cannot act on

Both of the above
Arithmetic expressions
Local variables
Members of a structure
R-values

ANSWER DOWNLOAD EXAMIANS APP

C Programming
What will be the output of following program code?#include int main(void){ char p; char buf[10] = {1, 2, 3, 4, 5, 6, 9, 8}; p = (buf + 1)[5]; printf("%d", p); return 0;}

6
Error
9
None of these
5

ANSWER DOWNLOAD EXAMIANS APP
MORE MCQ ON C Programming

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
↑