Dasturlash tillari



Download 35.61 Kb.
Sana27.10.2019
Hajmi35.61 Kb.
Rahmonov Azamatning

Dasturlash tillarifanidan tayyorlagan



Sessiya Oraliq nazorat ishi

1-topshiriq.

C++




Standart funksiyalar

O’zgaruvchilar va o’zgarmaslar



Main, void, return, system

Int, float, float const


2-topshiriq. Jadvalnito’ldiring.
Razryadli mantiqiy amallarning bajarish natijalarini ifodalang


A

B

C=A&B

C=A|B

C=A^B

C=~A

1

1

1

0

1

0

1

0

0

1

0

0

0

1

0

0

0

1

0

0

1

0

0

1



3-topshiriq.C++ dasturlash tilida ifodalang
,





4-topshiriq. Test.





  1. class Home{ public: string GetName (string n) {return n;} intsqr(int a) {return a*a;} Sinfto`g`ritashkilqilinganmi ?

  1. ha

  1. yoq

  1. Bilmayman

  1. xato




  1. classdaraxt

{

public:


unsignedintuzunligi ;

unsignedintyoshi;

into_sish(inti)

{

i++;



return i;

};

};



intmain()

{

int k=2;



daraxtolma_daraxt;

olma_daraxt.uzunligi=5;

olma_daraxt.yoshi=7;

cout<

system("pause");

}

Natijani aniqlang



  1. 3

  1. 5

  1. 7

  1. 8



  1. Yangi tip kiritish amalini ko’rsating

  1. typedef

  1. define

  1. sizeof

  1. struct




  1. Intmain()

{

Int i=5;


Cout<Cout<<++i;

}

Natija qanday?



  1. 5,7

  1. 6,7

  1. 3,7

  1. 4,7




  1. C++ dasturlash tilida ishlatiladigan operatorlar tog’ri ko’rsatilgan javobni tanlang

  1. cout, getch, return

  1. begin , include, clrscr

  1. while, NULL, type

  1. cin, gets, char

1-A; 2-A; 3-A; 4-B; 5-A;
5-topshiriq. Radiuslari A va R ga teng (A2-A2)).

#include

int main()

{

      float a,R,s;



      cout<<"a va R ni kiriting"<

      cin>>r>>R;

      cout<<"S halqa="<

      return 0;



}

Do'stlaringiz bilan baham:


Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2019
ma'muriyatiga murojaat qiling

    Bosh sahifa