Care dintre următoarele variante reprezintă o declarare corectă pentru o variabilă x care memorează simultan codul de identificare al unui candidat la un examen, exprimat printr-un număr natural de cel mult 4 cifre şi media obţinută de acesta la examen, exprimată printr-un număr real?
Exerciții cu structuri C++ (tipul struct)

Quiz
•
Computers
•
10th Grade
•
Hard
Cristiana Caprioara
Used 7+ times
FREE Resource
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
struct x { int cod;
float media;};
struct {int cod;
float media;} x;
int x.cod ;
float x.media;
struct candidat {int x.cod;
float x.media;};
2.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Pentru declaraţia de mai jos precizaţi care din instrucţiunile de atribuire este greşită:
e1=e2+1;
e1.nume[0]=’A’;
e1=e2;
e1.nota1=e2.nota2+1;
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Pentru declaraţiile alăturate, care este numărul maxim de numere întregi ce pot fi memorate în variabila a?
struct punct3D {
int x; int y; int z;};
punct3D a[2][5];
52
200
25
30
4.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Care este necesarul de memorie (numărul de octeți) pentru memorarea variabilei a declarată mai jos?
struct elev { char nume[30];
int nota;};
elev a[2];
2
68
30
32
5.
MULTIPLE SELECT QUESTION
2 mins • 1 pt
Considerând declarările următoare, care dintre următoarele referiri este corectă din punct de vedere sintactic ?
struct datan {int zi,ln,an;};
struct elev {char nume[30];
datan dn,da;} e;
e.datan.ln
e.nume
e.dn.an[2]
e.dn.zi
e.da.zi
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Cum se poate accesa prima literă a denumirii primului produs din șirul de produse p declarat mai jos?
struct produs {char denumire[20];
float pret;}
produs p[20];
produs[0].denumire[0]
denumire.p[0]
p[0].denumire[0]
p->denumire[0]
7.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Se consideră declarările următoare:
struct A { int m;
char n;};
struct B { float m;
long n;};
struct C { struct A m;
struct B n;} m, n;
Care este tipul expresiei m.m.n?
int
char
float
long
8.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
În declararea alăturată, câmpurile x şi y ale înregistrării pot memora coordonatele carteziene ale unui punct din planul xOy. Care dintre următoarele expresii are valoarea 1 dacă şi numai dacă punctul P este situat pe axa Ox?
struct {float x;
float y;} P;
P.x+P.y==0
P.x==0
P.x==P.y
P.y==0
Similar Resources on Quizizz
10 questions
Data Types in Python

Quiz
•
9th - 12th Grade
10 questions
Understanding Programming Constructs

Quiz
•
10th Grade - University
10 questions
C++ - PEI

Quiz
•
10th Grade
10 questions
Structs em C

Quiz
•
9th - 12th Grade
10 questions
C# lesson10

Quiz
•
1st - 10th Grade
10 questions
Python тілінде программалау

Quiz
•
1st - 10th Grade
12 questions
Java - arrays and String methods

Quiz
•
9th - 12th Grade
10 questions
Python Data Types

Quiz
•
9th - 12th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University