Logo Facebook8    Logo Youtube12    Logo Google     Logo twitter

Lectia 5 C++ | Constante

Constantele sunt opusul variabilelor.
O constanta nu poate sa isi schimbe valoarea data pe parcursul programului.
Cand ii atribuim unei constante o valoare, aceasta valoare se poate schimba doar schimband valoarea initiala.
Valoarea unei constante se atribuie in momentul declararii constantei
Declararea unei constante, se face punand "const" inaintea unui tip de date.

EXEMPLU:

 

#include <iostream>
#include <stdio.h>
using namespace std;

int main(){

const int a=7; //am pus "const" in fata unui tip de date(int) si i-am atribuit o valoare.
//valoarea se atribuie in momentul declararii constantei
//aceasta valoare nu se poate schimba pe parcursul programului
printf("%d",a);

return 0;}

 7

 

Acest site foloseste cookie-uri.

Folosim cookie-uri pentru a vă asigura că aveti cea mai bună experiență pe acest site.

I understand
DESPRE NOI
World-IT este un site care are ca domeniu Tehnologia Informatiei(IT).
Acest site are ca prim scop introducerea persoanelor in acest domeniu. Mai multe informatii aici.

URMARESTE-NE 
Logo Facebook8  Logo Youtube12   Logo Google  Logo twitter

Sitemap | Despre noi

viagrageneric viagraviagra couponsviagra genericviagra pricesviagra onlinebuy viagracialis vs viagraviagra pillsviagra couponviagra for womenviagra samplesviagra side effectscheap viagranatural viagradoes viagra workviagra costviagra vs cialiscost of viagraonline viagrapfizer viagraviagra on lineviagra single packsfemale viagraviagra dosagehow does viagra workside effects of viagrapfizer viagra couponssex viagra for womenviagra for saleviagra from canadaviagra alternativescanadian viagrabuy viagra onlinelevitra vs viagrafree viagraviagra from amazongeneric viagra 100mgrevatio vs viagrahealthy man viagraherbal viagrawhat is viagraviagra best priceorder online viagrageneric for viagraviagra pills for saleviagra on line no precviagra substitutesildenafil vs viagrawhat does viagra doviagra coupons 75 offviagra canadafemale viagra pillsviagra sexdiscount viagrastendra vs viagraviagra activatesophia viagrawhere to buy viagraotc viagratrial viagra samplecialis or viagraviagra ingredientsbest price viagraviagra pharmacyviagra doseviagra pricecanada viagraviagra costsviagra savings offernon prescribed viagraviagra pornviagra girlswomen viagraviagra pillutilisation viagracialiscialis couponcialis genericcialis dosagegeneric cialiscialis costcialis vs viagracialis pricescialis side effectscialis couponscialis 30 day sampleviagra vs cialiscialis onlinecialis pillscialis samplesbuy cialiscialis 20 mgcialis for daily usecheap cialiscost of cialis200 cialis couponcialis dailycialis 20mgcialis canadacialis trialhow does cialis workcialis on lineside effects of cialiscialis 5mgcialis for menbuy cialis onlinecialis for salehow to take cialiscialis pricecialis from canadafree cialiscialis reviewswhat is cialiscialis pills for salecanadian cialiscialis tadalafilcialis or viagrageneric for cialiscialis professionalcialis free trialcialis medicationcialis for bphcialis coupons 2017cialis discountdiscount cialiscialis 5 mgonline cialiscialis copay cardlowest cialis pricescialis for womencialis vouchercialis savings cardcialis 10 mgcialis websiteliquid cialisdaily cialisviagra cialiscialis otccialis 5mg dailycanada cialiscialis coupon 20 mgcialis pricingcialis coupon printviamedic cialiscialis cheapcialis pharmacy pricescialis 20mg directionsprice cialiscialis samplewholesale cialiscialis alternativecialis effectscialis testimonialslevitracialis vs viagravardenafilviagra pillsviagra vs cialiscialis pillslevitra couponlevitra 20 mglevitra vs viagrarevatio vs viagrahow does cialis workvardenafil 20mgstendra vs viagralevitra pricesbuy levitralevitra genericgeneric levitralevitra online