C++
What is th ...
Site Language: English
Українська
English
Русский
Programming Tests
Login
Sign Up
Programming Tests
Theory
Snippets
Papers
Landing
Android
Prices
FAQ
Cosmo Story
Terms and Conditions
Privacy Policy
Cookies Policy
Send Feedback
What is the extern "C" construct used for? Check all that apply.
There is no such construction in C ++
So that functions compiled by the C ++ compiler can be called from a program written in C.
So that functions compiled by the C compiler can be called from a program written in C ++
So that the methods of C++ classes can be accessed from programs written in C
This construction is similar to the usual extern specifier (without "C") and is needed only for backward compatibility with old C ++ standards
Explanation
Get an explanation when it's available:
Subscribe
compilers
extern
Like
Login in
to like
Comment
Login in
to comment
Share
Tweet
Related Content
Какие переменные доступны из других единиц трансляции? int w = 1; static int x = 2; const int y = 3; extern const int z = 4; int main(int argc, char** argv) { return 0; }
Какие методы компилятор может автоматически сгенерировать для данного класса?class A { };
В каких случаях класс A будет иметь не более одного конструктора, учитывая конструкторы, автоматически сгенерированные компилятором? (код, использующий данный класс, может быть произвольным).
Что будет в переменной res после выполнения следующего кода? int a = 5; int data[3]; data[0] = 10; int res = a * data[0] / (data[0] = 5);
Выберите правильные утверждения для следующего кода struct A { virtual void Foo() = 0; }; struct B : A { void Foo() { /*code*/ } };
C
++
Quiz
Login to learn C++
or
Read more about
C++ Quizzes
Follow CodeGalaxy
Mobile Beta
Send Feedback
Keep exploring
C++ quizzes
int main() { const int* i = int(); // 1 int const* j = int(); //2 int* const k = int(); //3 int* l(); //4 ++i; //5 ++j; //6 ++k; //7 ++*k; //8 ++l; //9 } Откомпилируется ли такой код? Если нет, то в каких строчках будут ошибки компиляции? После стандарта C++14.
Какой результат работы программы? #include <iostream> using namespace std; void f(double) { cout<<"f1"<<endl; } void f(const int ) { cout<<"f2"<<endl; } void f( int & ) { cout<<"f3"<<endl; } void main(void) { int n = 1; double b = 2; f(n); f(b); }
#include <iostream> using namespace std; int &test() { static int a = 3; return a; } int main() { ++++++test(); cout << test() << endl; return 0; } Что выведет cout?
При истинности какого из приведенных высказываний имеет смысл вычитание указателей?
Какое ключевое слово используется для описания пространства имен?
В чем разница между X x; и X x(); ?
Sign Up Now
or
Subscribe for future quizzes
Login in to like
Login in to comment