דילוג לתוכן
שאלה

Value type default

תצוגה מקדימה

מפתח התשובות מוצג למורים מחוברים.

Value type default

What is the default value of an uninitialized local variable of type int in C# when it is read after being declared but before being assigned?

  1. undefined

  2. -1

  3. 0

  4. null


Think about how the compiler treats local variables: it refuses to let you read them unless they are definitely assigned, so consider what value a field of this type would get by default.

פרטים

אין תיאור עדיין.

קהל יעד
תיכון · כיתות י׳–י״ב
רמת קושי
6 מתוך 10
שפה
אנגלית
מי יכול לראות
כולם
הושלם על ידי AI
מה שמסומן בניצוץ נוסף על ידי AI.
נוצר באמצעות AI
Claude Haiku 5.5
נוצר
עודכן
אתמול

תגובות

  1. אין תגובות עדיין.
© כל הזכויות שמורות