Cum declaram un vector cu 10 elemente?

Programare cu C++ avansat 3

Quiz
•
Computers
•
6th - 8th Grade
•
Easy
Ali Cabas
Used 5+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
int[10] v;
int v={0,1,2,3,4,5,6,7,8,9};
int v[];
int v[10];
2.
MATCH QUESTION
1 min • 1 pt
Pentru sirul respectiv care potriveste?
int v[10]={3, 7, 5, 2, 9, 1, 4, 6, 0, 8};
11
for(i=9; i>=0; i-=2)
cout<<v[i]<<" ";
7
cout<<v[ v[0] ];
2
for(i=0; i<10; i+=2)
cout<<v[i]<<" ";
3 5 9 4 0
cout<<v[0]+v[9];
8 6 1 2 7
cout<<v[1];
3.
REORDER QUESTION
1 min • 1 pt
Gasiti ordine
int v[10];
int main() {
int n, s=0;
cin >> n;
for(i=0; i<n; i++)
cin >> v[i];
for(i=0; i<n; i++) {
if(v[i]>v[n-1])
s+=v[i]; }
cout << s; }
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
int v[10]={0,1,2,3,2,5,1,6,3,8};
Care sorteaza toate elementele din sirul v in ordine crescatoare
sort(v);
sort(v+10);
sort(v, v+10);
sort(v, v+9);
5.
MATCH QUESTION
45 sec • 1 pt
Care potriveste?
ifstream fin("file.in");
#include <cmath>
cout << "Test";
#include <fstream>
sort(v, v+n);
#include <iostream>
sqrt(a)
#include <algorithm>
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
care se verifica daca sirul v[n] este un sir palindrom?
int cnt=0, i;
for(i=0; i<n; i++) {
if(v[i]==v[i+1])
cnt++; }
if(cnt==n)
cout << "Da";
int cnt=0, i;
for(i=0; i<n; i++) {
if(v[i]==v[n-i-1])
cnt++; }
if(cnt==n)
cout << "Da";
int cnt=0, i;
for(i=0; i<n/2; i++) {
if(v[i]!=v[i+1])
cnt++; }
if(cnt==0)
cout << "Da";
int cnt=0, i;
for(i=0; i<n/2; i++) {
if(v[i]!=v[n-i-1])
cnt++; }
if(cnt==0)
cout << "Da";
7.
MATCH QUESTION
1 min • 1 pt
int v[10]={60, 23, 102, 25, 33, 47, 204, 102, 20, 17};
Care potriveste?
5
for(i=1; i<10; i++)
if(v[i]%2==v[i-1]%2)
cnt++;
1
for(i=0; i<5; i++)
if(v[i]==v[9-i])
cnt++;
3
for(i=1; i<10; i++)
if(v[i]>v[0])
cnt++;
4
for(i=0; i<10; i++)
if(v[i]%2==0)
cnt++;
Create a free account and access millions of resources
Similar Resources on Quizizz
10 questions
С++ цикл for

Quiz
•
6th - 9th Grade
11 questions
Массивы в C++: ввод/вывод

Quiz
•
6th - 8th Grade
12 questions
Programare cu C++ nivel incepatori 5

Quiz
•
6th - 8th Grade
11 questions
Строки в с++

Quiz
•
8th Grade
11 questions
C++ Functions

Quiz
•
6th - 8th Grade
15 questions
C++ While Loops

Quiz
•
6th - 8th Grade
10 questions
C++

Quiz
•
7th - 8th Grade
9 questions
Test vectori Cls 8

Quiz
•
8th 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
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
20 questions
Final Exam Vocabulary

Quiz
•
6th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
11 questions
Decimal/fraction conversions quick check

Quiz
•
5th - 7th Grade
10 questions
Identifying equations

Quiz
•
KG - University
44 questions
El fin del año- 7th

Quiz
•
7th - 12th Grade
40 questions
Word Study Assessment: Roots, Prefixes, Suffixes, and Vocabulary

Quiz
•
8th Grade
49 questions
How Well Do You Know Your 6th Grade Teachers?

Quiz
•
6th Grade