• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/7

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

7 Cards in this Set

  • Front
  • Back

Standard library in c++ ( 3 letters)



write the import declaration

STD



using namespace std;

Main declaration


return type: integer

int main (int argc, char ** argv)

line for printing on console an error in C and C++

C:


fprintf(stderr, "Error\n");



C++:


cout<<"Error"<

Whats the difference between \n and endl in C++

endl flush the buffer and \n doesn't, its better to use endl

If you don't import the standard library in C++, write a line to print "Hello"in console

std::cout<<"Hello"<

Command to capture user input in C,write an example:



Requirement:


(capture="Hello this is a string")

fgets is the command; fgets(str_buffer,size_of_buffer,input);



Example:


enum{ max_string =127} ;


static char string[max_string+1] = "";


fgets(string, max_string, stdin);


Command to capture user input in C++,write an example:



Requirement:


(capture="Hello this is a string")

getline is the command;


getline(input,str_buffer);



Example:


String input;


getline(cin,input);