Quiz-1

Q 1. which functions receives value from the keyboard? / कीबोर्ड से कौन से फंक्शन वैल्यू प्राप्त करते हैं? (RPSC ACP programmer 2011)

  1. printf()
  2. scanf()
  3. both A & B
  4. none of these
View Answer Watch Solution Video

Q 2. What is the default return type of printf() and scanf() function in C language? / सी भाषा में प्रिंटफ () और स्कैनफ () फ़ंक्शन का डिफ़ॉल्ट रिटर्न प्रकार क्या है?

  1. char
  2. integer
  3. header file
  4. All of the above
View Answer Watch Solution Video

Q 3. What is return type of scanf()  library function in C ? / C में scanf() लाइब्रेरी फ़ंक्शन का रिटर्न प्रकार क्या है?

  1. int
  2. char
  3. float
  4. class
View Answer Watch Solution Video

Q 4. What will be the output of following C CODE? /  निम्नलिखित सी कोड का आउटपुट क्या होगा
int r=scanf("%d");
printf("%d",r);

  1. Takes one input & display garbage value
  2. Compiler error
  3. Nothing
  4. Takes one input & display one character
View Answer Watch Solution Video

Q 5. What will be the output of following C  code  /  निम्नलिखित सी कोड का आउटपुट क्या होगा
scanf("%d");

  1. o
  2. compiler error
  3. Garbage
  4. Nothing
View Answer Watch Solution Video

Q 6. What will be the output of following C  code / निम्नलिखित सी कोड का आउटपुट क्या होगा
int p = printf(“123”+1);
printf(“%d”,p)

  1. 123
  2. compiler error
  3. 232
  4. 124
View Answer Watch Solution Video

Q 7. What will be the output of following C  code / निम्नलिखित सी कोड का आउटपुट क्या होगा
int r = printf(“Hi”,”Hello”);
printf(“%d”,r);

  1. HiHello
  2. Hi5
  3. Hi,Hello
  4. Hi2
View Answer Watch Solution Video

Q 8. What will be the output of following C  code / निम्नलिखित सी कोड का आउटपुट क्या होगा
printf(“123”,”Hello”);

  1. 123
  2. compiler error
  3. nothing
  4. 123Hello
View Answer Watch Solution Video

Q 9. The printf ( ) function is used for./printf ( ) फंक्शन का उपयोग होता है।

  1. data input
  2. data output
  3. both a and b
  4. none
View Answer Watch Solution Video

Q 10. What is the output of this C code? / इस C कोड का आउटपुट क्या है?
int main()
{
int x;
printf("Hello World! %d \n", x);
return 0;
}

  1. Hello World! x;
  2. Hello World! followed by a junk value
  3. Compile time error
  4. garbage
View Answer Watch Solution Video