Quiz
C++
Create a free account to finish this quiz
Save your progress and see your final score.
Already have an account? Sign in
Questions in this quiz (6)
1int main(){
std::cout<< "Le QUIZ est trop simple !" << std::endl;
return 0;
}
The program does not get compiled, which library should be included?- A#include <stdlib.h>
- B#include <iostream>
- C#include <stdio.h>
- D#include <display>
2#include <iostream>
int main()
{
std::cout<< "Le QUIZ est trop simple !" << std::endl;
return 0;
}
How to simplify the code by avoiding writing std:: ?- Ausing namespace std;
- Bnamespace std;
- Cusing std;
- Dusing std namespace;
3#include <iostream>
using namespace std;
int main(){
cout<< "Le QUIZ est trop simple !" << endl;
return 0;
}
The right way to comment ?- A#include <iostream> # Inclut la bibliothèque iostream
using namespace std; # Indique quel espace de noms on va utiliser
# Fonction principale main
# Tous les programmes commencent par la fonction main
int main()
{
cout<< "J'adore ce QUIZ !" << endl; # Affiche un message
return 0; # Termine la fonction main et donc le programme
} - B#include <iostream> //Inclut la bibliothèque iostream
using namespace std; //Indique quel espace de noms on va utiliser
/*
Fonction principale main
#Tous les programmes commencent par la fonction main
*/
int main()
{
cout<< "J'adore ce QUIZ !" << endl; //Affiche un message
return 0; //Termine la fonction main et donc le programme
} - C#include <iostream> <!-- Inclut la bibliothèque iostream -->
using namespace std; <!-- Indique quel espace de noms on va utiliser
<!-- Fonction principale main
#Tous les programmes commencent par la fonction main -->
int main()
{
cout<< "J'adore ce QUIZ !" << endl; <!-- Affiche un message -->
return 0; <!-- Termine la fonction main et donc le programme -->
} - D#include <iostream> //Inclut la bibliothèque iostream
using namespace std; //Indique quel espace de noms on va utiliser
//Fonction principale main
//Tous les programmes commencent par la fonction main
int main()
{
cout<< "J'adore ce QUIZ !" << endl; //Affiche un message
return 0; //Termine la fonction main et donc le programme
}
- A#include <iostream> # Inclut la bibliothèque iostream
4What is the right data type to declare a decimal number?
- Abool
- Bchar
- Cint
- Ddouble
5You want to declare a variable and give a value of a character, which one is true ?
- Achar character('C') ;
- Bcharacter char ='C' ;
- Cchar character=C ;
- Dchar 'C'=character ;
6#include <iostream>
using namespace std;
int main()
{
double pi(3.1415);
return 0;
}
What instruction should be added to print out the value of pi?- Acout >> pi;
- Bcout << pi
- Ccout < pi;
- Dcout << pi;
Information
- Description
- Quiz on C++, created by Blue .DEAN on 13/05/2022.
- Author
- Blue .DEAN
- Language
- English
- Views
- 0
- Rating
- No ratings yet Rate this quiz
More on C++ Programming Basics