What is the right way to Initialization array?
Guiding State PSC aspirants since 2016 50,000+ students · 1,000+ final selections Exam Calendar Results Call 9116926003
pscnotes
Pick your state
GPSC Prelims previous year questions

What is the right way to Initialization array?

Asked in GPSC Assistant Director (Training)/Principal, Gujarat Skill Training Service Class-1 2021

  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 };
Show answer

Answer: A. int num[6] = { 2, 4, 12, 5, 45, 5 };

More GPSC Prelims previous year questions questions

All 77,252 GPSC Prelims previous year questions questions →