C quiz1

Descripción

A c quiz
Yonatan Caspi
Test por Yonatan Caspi, actualizado hace más de 1 año
Yonatan Caspi
Creado por Yonatan Caspi hace más de 7 años
51
0

Resumen del Recurso

Pregunta 1

Pregunta
int func(int arr[10]); מי מהבאים היא קריאה חוקית לפונקציה הבאה (בתשובתכם התייחסו רק לקומפילצית הקריאה ולא ללוגיקה של הפונקציה)
Respuesta
  • int* p = NULL: func(p);
  • int big[100]; func(big);
  • int* q = malloc(sizeof(int)); func(q);
  • כל התשובות נכונות

Pregunta 2

Pregunta
The sizeof of a struct is always equal to the sum of sizeofs of its members.
Respuesta
  • True
  • False

Pregunta 3

Pregunta
עבור הפקודה הבאה: unsigned int x = -1;
Respuesta
  • Preprocessing error
  • Compilation error
  • Linkage Error
  • No error

Pregunta 4

Pregunta
בהינתן הקוד הבא int i = 9; int j = 10; const int* p = &i; int const *q=&i; הפקודה p = &j;
Respuesta
  • תעבור קומפילציה
  • לא תעבור קומפילציה

Pregunta 5

Pregunta
בהינתן הקוד הבא int i = 9; int j = 10; const int* p = &i; int const *q=&i; הפקודה q = &j;
Respuesta
  • תעבור קומפילציה
  • לא תעבור קומפילציה

Pregunta 6

Pregunta
בהינתן הקוד הבא int i = 9; int j = 10; const int* p = &i; int const *q=&i; הפקודה *p = 6;
Respuesta
  • תעבור קומפילציה
  • לא תעבור קומפילציה

Pregunta 7

Pregunta
הערה: במבחן היה צריך להסביר את התשובה
Respuesta
  • לא תהיינה שגיאות
  • שגיאת קומפילציה בלבד
  • שגיאת לינקג' בלבד
  • שגיאת לינקג' וגם שגיאת קומפילציה

Pregunta 8

Pregunta
[blank_start]double[blank_end] derive([blank_start]double (*f)(double)[blank_end], [blank_start]double x0[blank_end]) { double h = 0.0001; double df = f(x0+h) - f(x0); return df/h; } parameters: f, x0 השלימו את החתימה של הפונקציה
Respuesta
  • double
  • double (*f)(double)
  • double x0

Pregunta 9

Pregunta
הלולאות הבאות ירוצו מספר זהה של פעמים for(i=0; i <10; i++) {...} for(i=0; i<10;++i) {...}
Respuesta
  • True
  • False

Pregunta 10

Pregunta
אילו מבין הטענות הבאות מתקיימות בהכרח בסטנדרט של השפה 1. sizeof(short*) = sizeof(int*) = sizeof(long*) 2. sizeof(int) = 4
Respuesta
  • אף אחת
  • רק 1
  • רק 2
  • שתי הטענות

Pregunta 11

Pregunta
הביטוי הבא מוערך כאמת 3.0/2 == 3/2
Respuesta
  • True
  • False

Pregunta 12

Pregunta
מהו התהליך שבמהלכו תהיה בעיה בעיבוד הקוד הנ"ל
Respuesta
  • Preprocessing
  • Compiling
  • Linking

Pregunta 13

Pregunta
נתונה פונקצייה שמוסיפה למחרוזת אחרי כל אות איי את האות ב ani -> abni חתימת הפונקציה היא: char* add_b_after_a(char* str); האם ניתן להחליף להחליף את החתימה void add_b_after_a(char* str);
Respuesta
  • True
  • False

Pregunta 14

Pregunta
void func(int arrayOfInts[10][6][5]); נתון sizeof(int) = 4 sizeof(void*) = 8 מלאו את הגדלים הבאים שימו לב להתייחס למה שקורה בתוך הפונקציה sizeof(arrayOfInts) = [blank_start]8[blank_end] sizeof(*arrayOfInts) = [blank_start]120[blank_end] sizeof(**arrayOfInts) = [blank_start]20[blank_end] sizeof(***arrayOfInts) = [blank_start]4[blank_end]
Respuesta
  • 8
  • 120
  • 20
  • 4
Mostrar resumen completo Ocultar resumen completo

Similar

Computing Hardware - CPU and Memory
ollietablet123
SFDC App Builder 2
Parker Webb-Mitchell
Data Types
Jacob Sedore
Intake7 BIM L1
Stanley Chia
Software Processes
Nurul Aiman Abdu
Design Patterns
Erica Solum
CCNA Answers – CCNA Exam
Abdul Demir
Abstraction
Shannon Anderson-Rush
Spyware
Sam2
HTTPS explained with Carrier Pigeons
Shannon Anderson-Rush
Data Analytics
anelvr