NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io


<1>Which of these headers provides functionality for reading data from a file and for writing to a file.
<variant>fstream
<2>What type of variable is used in the code int a = 5;
<variant> Signed 32-bit integer
<3>What does the "%" operator do?
<variant>Returns the remainder of the division
<4 >What will the program do by executing the following code: Console.WriteLine(«Hello, World!»);
<variant>Will write on a new line Hello, World!
5>What will be equal to c if int a = 17; int b = 4; int c = a % b;
<variant>1
6>What will be equal to c if int a = 10; int b = 4; bool c = (a == 10 && b == 4);
<variant>True
7>What will be equal to c if int a = 12; int c = a-;
<variant>12
8>What will be equal to d if int a =10; int b = a++; int c = 0; int d = a + b + c + 3;
<variant>24
9>What will be the result of calculating the expression: int d=5; bool b = true, c; c = (!b||(d>3)):
<variant>true
<10>What are conditional operators for?
<variant>For branching the program
<11>What the Term function will return after executing. Code: int Termin() { int a = 5; int b = 3; if (a != 5) return a + b; else return 0;}
<variant>0
<12>Which of the components can be included in the integrated programming environment:
<variant>debugger
<13>Which of the components can be included in the integrated programming environment:
<variant>text editor
<14>Which of the components can be included in the integrated programming environment:
<variant>compiler
<15>If a subtraction operation is defined for two objects of class A, and the conversion operation to int is not defined, what will be called when:A a1,a2,a3=5;a3 = a1 – a2;
<variant>an error will occur
<16>What is the name of the operator "?:"
<variant>Ternary operator
17>What is an array
<variant>A set of the same type of data that are located in memory sequentially one after another
18>Types of arrays?
<variant>One- dimensional and multidimensional
<19>What is a cycle and what are they for
<variant>Loops are needed for multiple code execution.
<20>What are the cycles?
<variant>for, while, do-while, foreach
<21>The function calculates the product of two numbers. The initial data is entered from the keyboard. What checks are advisable to enter in the program:
<variant>checking that the source data are numbers
<22>What is a constant?
<variant>A variable whose value cannot be changed.
<23>What is the namespace operator for?:
<variant>to enclose in a group of declarations of classes, variables and functions in a separate context with its own name
<24>Which of the sets of enumerated values is written correctly:
<variant>enum;
<25>What is the difference in using the following expressions #include<...> and #include"..."
<variant>the difference lies in the method of searching for the included file by the preprocessor
<26>If integer and real operands are involved in an arithmetic expression, then:
<variant> the whole type is reduced to real
<27>If there is a semicolon after the expression, then:
<variant> is an expression operator whose action is to evaluate the expression
<28>Specify in which expression the loss of accuracy will occur:
<variant>int i; float x = 2.134, y = 3.14; i = x/y;
<29>What is dynamic memory allocation:
<variant>memory for an object (variable) may not be allocated immediately, but during the operation of the program, memory is released manually
<30>Mark the true statement:
<variant>variable is declared, then changed
<31>Which operations can be overloaded:
<variant>unary and binary
<32>A variable of the “signed char” type can take values:
<variant>from the first half of the code table
<33>What is the numeric value of the expression e/2*a-abs(e)*1e0 by e = 4, a = 2:
<variant>0
<34>Choose the correct statement:
<variant>an integer variable can be assigned a real constant
<35>Choose the correct statement:
<variant>an integer variable can be assigned an integer constant
<36>Which expression does not contain syntax errors:
<variant>((cos(3*a+1.*abs(x))))
<37>Which expression does not contain syntax errors:
<variant>0XCC00*.34E-4/_do/k-2
<38>What is the numeric value of the expression sqrt(4)+142/20*2:
<variant>16
<39>What will be displayed as a result of executing a program fragment a=5; b=3; cout << a << "=Z(" << b << ")"; Here a and b are integer variables.
<variant>5=Z(3)
<40>What will the variable "c" be equal to after executing this program: a = 26; b = 6; c = a % b + b;
<variant>8
<41>What will the variable "c" be equal to after executing this program: a = 24; b = 5; b = a / b; c = a % (b + 1);
<variant>4
<42>Determine the value of the variable "a" after executing the program fragment: a = 10; if ( a < 5 ) a = a + 12; else a = a - 7;
<variant>3
<43>Determine the value of the variable "a" after executing the program fragment: a = 10; if ( a > 5 ) a = a + 12; else a = a - 7;
<variant>22
<44>Determine the value of the variable "a" after executing the program fragment: a = 10; b = 7; if ( a > 5 && a < b ) a = a - 5;
<variant>10
<45>What logical operation should be added to the program instead of an ellipsis so that the value of the variable "a" after executing the program fragment becomes equal to 15? a = 10; b = 5; if ( a < 1 ... a > b ) a = a - 5; else a = a + 5;
<variant>and
<46>What number will be displayed on the screen as a result of executing the program snippet? i = 6; cout << "9"; while ( i < 5 ) { cout << i; i++; }
<variant>9
<47>What number should be written instead of an ellipsis so that the cycle runs exactly 2 times? i = 4; while ( i >= ... ) { cout << "Привет!n"; i--; }
<variant>2
<48>What will be the value of the integer variable "a" after executing this fragment of the program? a = 2; for ( i=0; i<=4; i++ ) a += i;
<variant>12
<49>What number will be displayed on the screen after executing this fragment of the program? for ( i=2; i>=1; i-- ) cout << i;
<variant>21
<50>Check all the correct statements about arrays in C++
<variant> all array elements must be of the same type
<51>What index does the last element of array “A” have? int A[6];
<variant>5
<52>It is required to fill the array exactly like this: X = [1 3 5 7 9 11] Which operator should be placed in the body of the loop instead of an ellipsis? for ( k=0; k<6; k++ ) { ... }
<variant>X[k] = 2*k + 1
<53> Why use functions?
<variant>All answers are correct
<54> This class represents an output stream. It’s used for creating files and writing information to files.
<variant> ofstream
<55> This class represents an input stream. It’s used for reading information from data files.
<variant> ifstream
<56> Position functions..
<variant> All the answers are correct
<57> The ability to handle exceptions in C++ throw keywords
<variant> when a program encounters a problem, it throws an exception. The throw keyword helps the program perform the throw.
<58> The ability to handle exceptions in C++ catch keywords
<variant> a program uses an exception handler to catch an exception.
<59> The ability to handle exceptions in C++ try keywords
<variant> the try block identifies the code block for which certain exceptions will be activated.
<60> What is Char?
<variant> Char is a C++ data type designed for the storage of letters.
<61> What is String?
<variant> A string is a sequence of characters..
<62> Here is example using the C++ standard….:
#include <iostream>
#include <string>
using namespace std;
int main() {

string name = "Guru99";

cout << "The name is : " << name << endl;

return 0;
}
<variant> string class
<63> #include <iostream>
using namespace std;
int main() {
char grade = 'B';
cout<< "I scored a: "<<grade;
return 0;
}
Output is?
<variant> I scored a:B
<64> strcat() strings fanctions syntax is?
<variant> strcat(string1, string2);
<65> strcpy() string fanctions means:
<variant> This is the string copy function. It copies one string into another string.










































     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.