Quiz-1

Q 1. Array can be considered as set of elements stored in consecutive memory locations but having……?/ सरणी को लगातार स्मृति स्थानों में संग्रहीत तत्वों के सेट के रूप में माना जा सकता है लेकिन ……?

  1. Same data type
  2. Different data type
  3. Same Scope
  4. None of these
View Answer Watch Solution Video

Q 2. What is the dimension of the below C Array? / नीचे C Array का डाइमेंशन क्या है?
int ary[]={1,3,5,7};

  1. 1
  2. 2
  3. 3
     
  4. 5
View Answer Watch Solution Video

Q 3. What is the maximun number of dimensions an array in C may have? / सी में एक सरणी में आयामों की अधिकतम संख्या क्या हो सकती है?

  1. 2
  2. 8
     
  3. 16
  4. Theoratically no limit. The only practical limits are memory size and compilers
View Answer Watch Solution Video

Q 4. What is right way to Initialize array? / सरणी प्रारंभ करने का सही तरीका क्या है?

  1. int num[6] = { 2, 4, 12, 5, 45, 5 };
  2. int n{} = { 2, 4, 12, 5, 45, 5 };
  3. int n{6} = { 2, 4, 12 };
  4. int n(6) = { 2, 4, 12, 5, 45, 5 };
View Answer Watch Solution Video

Q 5. What is the value of a[4]? / a[4] का मान क्या होता है?
int a[5]={1,2,4,1,0};

  1. 1
  2. 10
  3. Error
View Answer Watch Solution Video

Q 6. An array Index starts with.? / एक सरणी सूचकांक के साथ शुरू होता है।

  1. -1
  2. 1
  3. 2
View Answer Watch Solution Video

Q 7. What is the output of C Program with Strings? / स्ट्रिंग्स के साथ C प्रोग्राम का आउटपुट क्या है?
int main()
{
char ary[]="Discovery Channel";
printf("%s",ary);
return 0;
}

  1. D
  2. Discovery Channel
  3. Discovery
  4. Compiler error
View Answer Watch Solution Video

Q 8. Array declaration in c / c . में Array घोषणा (RPSC ACP programmer 2011)
int a1 []= {2, 3, 5} ;
int a2 [] ;
int a3 [0] ;
int a4 [1] ;
float a5 [3.5] ;
Valid declarations are

  1. a1,a5
  2. a1, a4
  3. a3,a4
  4. All of these

Q 9. char w [20] = “Hello world!\0”;
How many bytes will be assigned to the 'w' array./‘w’ एरे के लिए कितने बाइट असाइन किए जाएंगे?

  1. 11 bytes
  2. 12 bytes
  3. 13 bytes
  4. 20 bytes

Q 10. code./कोड-
int main()
{
int a[2]={1,2};
int *array = &a[-1];
int i;
for(i=0;i<2;i++)
  {
printf("\t%d",*array);
array++;
}
return 0;
}
What will print as per above code./ऊपर दिए गए कोड के अनुसार क्या प्रिंट होगा?

  1. Error
  2. Garbage Value, 1
  3. 0 1
  4. 1 2