aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • C Programming
  • If a static array is not initialised, its elements will b...
Multiple choice

If a static array is not initialised, its elements will be set at

  1. 0

  2. an undetermined value

  3. floating point number

  4. the character constant '-'

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In C programming, static and global arrays are automatically initialized to zero if no explicit initialization is provided.

Keep practicing — related questions

  • An array is initialised as “static int arr[5]”. If we do not initialize the array in this case, what would ...
  • What would be the output of the following program? main() { static int a[20]; int i =0 ; a[i]=i++; printf("...
  • #include main(){ static int a[20]; int i=0; a[i]=i++; printf("%d %d %d",a[0],a[1],i); }
  • Given the following code fragment: int A[]; int i = 0; A = new int A[4]; while (i < 4) { A[i] = 10; i = i +...
  • Given the following code fragment:int A[];int i = 0;A = new int A[4];while (i < 4){A[i] = 10;i = i + 1;}
  • Till the array elements are not given any specific values, they are supposed to contain garbage values.
  • Which of the following is a wrong declaration of array?
  • Given the following code fragment: int A[]; int i = 0; A = new int A[4]; while (i < 4) { A[i] = 10; i = i +...
Play the full quiz 🎤 Practise this topic out loud

Practice this topic

  • Programming Output Evaluation (1721 questions)
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy