• 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(){ int c = - -2; printf("c=%d", c);}

2
-2
Error
1

ANSWER DOWNLOAD EXAMIANS APP

C Programming
What will be the output of the following program?#includevoid main(){ int i = 10; void *p = &i; printf("%d\n", (int)*p);}

Segmentation fault/runtime crash
Compiler time error
10
Undefined behavior

ANSWER DOWNLOAD EXAMIANS APP

C Programming
The address operator &, cannot act on

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

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]);}

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

ANSWER DOWNLOAD EXAMIANS APP

C Programming
Which of the following statements are true after execution of the program.void main(){ int a[10], i, *p; a[0] = 1; a[1] = 2; p = a; (*p)++;}

Compilation error
a[0] = 3
a[1] = 2
a[1] = 3
a[0] = 2

ANSWER DOWNLOAD EXAMIANS APP

C Programming
Consider the following code:void main(){ int a[5] = {6,8,3,9,0}, i=0; if(i != 0) { break; printf("%d", a[i]); } else printf("%d", a[i++]);}What is the output of the above program?

Syntax error
6
Runtime error
8
No output

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
↑