0% found this document useful (0 votes)
20 views1 page

Test de Verificare La Disciplina Informatica: Colegiul National "Sfântul Sava" Clasa A X-A A

This document is a test for a 10th grade class at Colegiul National "Sfantul Sava" assessing students' knowledge of functions used in C++ programs. It contains a sample C++ program and asks students to identify the effect of each function called in the program. Students are given 10 minutes to complete the test and are awarded 20 points initially. The test focuses on functions like cin, cout, strlen, strcpy, strcat, strchr, and strrchr.

Uploaded by

Buliga Florin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views1 page

Test de Verificare La Disciplina Informatica: Colegiul National "Sfântul Sava" Clasa A X-A A

This document is a test for a 10th grade class at Colegiul National "Sfantul Sava" assessing students' knowledge of functions used in C++ programs. It contains a sample C++ program and asks students to identify the effect of each function called in the program. Students are given 10 minutes to complete the test and are awarded 20 points initially. The test focuses on functions like cin, cout, strlen, strcpy, strcat, strchr, and strrchr.

Uploaded by

Buliga Florin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

COLEGIUL NATIONAL SFNTUL SAVA

CLASA a X-a A

NUME i PRENUME.........

Data

TEST DE VERIFICARE LA DISCIPLINA INFORMATICA


Completati efectul functiilor utilizate in programul C++, prezentat mai jos:
#include<iostream.h>
#include<string.h>
#include<conio.h>
void main()
{ char a[30]=culoare ,b[30]=galben,c[30],d[40];
int s,t;
clrscr();
cout<< primul sir = ;
cin.get(c,30);
cout<<c<<endl;.5p
cin.get();
cout<< al doilea sir = ; cin.get(d,40); cin.get();
cout<<d<<endl;....5p
s=strlen(a);
t=strlen(b);
cout<< s = <<s<<endl;

...5p

cout<< t = <<s<<endl;

...5p

cout<<strlen(c)<< <<strlen(d)<<endl;

5p

strcpy(a,b);
cout<< a = <<a<<endl;..5p
cout<< b = <<b<<endl; 5p
strcat(c,d);
cout<< c = <<c<<endl; . 5p
cout<< d = <<d<<endl; .5p
strncat(a,c,3);
cout<< c = <<c<<endl; . 5p
cout<< d = <<d<<endl; .5p
cout<< strchr(a,l)<<endl; . 5p
cout<< strchr(a,l)-a<<endl; . .5p
cout<< strrchr(a,l)<<endl; . 5p
cout<< strrchr(a,l)-a<<endl; . .5p
getche();
}
Observatii: 1. Se acorda 20puncte din oficiu.
2. Timp de lucru 10 min.

You might also like