• 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
Which of the following operator takes only integer operands?

*
+
%
/
None of these

ANSWER DOWNLOAD EXAMIANS APP

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

8 5 5
2 4 4
2 4 5
2 5 5

ANSWER DOWNLOAD EXAMIANS APP

C Programming
What will be the output of the program ?#include#includevoid main(){ char str1[20] = "Hello", str2[20] = " World"; printf("%s", strcpy(str2, strcat(str1, str2)));}

World
None of these
Hello
Hello World
WorldHello

ANSWER DOWNLOAD EXAMIANS APP

C Programming
Find the output of the following program.void main(){ char *msg = "hi"; printf(msg);}

Error
Garbage Value
h
hi
hi followed by garbage value

ANSWER DOWNLOAD EXAMIANS APP

C Programming
Determine Output:void main(){ int c[] = {2.8,3.4,4,6.7,5}; int j, *p=c, *q=c; for(j=0;j<5;j++){ printf(" %d ", *c); ++q; } for(j=0;j<5;j++){ printf(" %d ", *p); ++p; }}

2.8 2.8 2.8 2.8 2.8 2.8 3.4 4
2 2 2 2 2 2 3 4 6 5
2 3 4 6 5 2 3 4 6 5
2.8 3.4 4 6.7 5 2.8 3.4 4 6.7

ANSWER DOWNLOAD EXAMIANS APP

C Programming
Comment on the following?const int *ptr;

We can change the pointer as well as the value pointed by it.
We cannot change the value pointed by ptr.
We cannot change the pointer ptr itself.
Both of the above

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
↑