In: Computer Science
1) Which of the following is/are true?
- C++ programs can run on different platforms, like Windows and macOS, without being recompiled.
- The source code for a program can include code from the C++ standard library.
- The machine language that results from compiling a program is easy for a human to read.
- All of the above
2) What feature of an IDE can help you identify and fix syntax errors?
-the code completion feature
-the automatic compilation feature
-the syntax integration feature
-the error detection feature
3) As you develop a C++ program, you can use an IDE to
-enter and edit the source code
-compile the source code
-run the application
-all of the above
-both b and c
4) You can use a console application to
-get data from the user
-display data to the user
-use a graphical user interface to interact with the user
-all of the above
-a and b only
5) An IDE typically stores all of the files for a program in a
-chapter
-library
-project
-header
6) Which of the following is used to convert the source code for a program to object code?
-linker
-preprocessor
-compiler
-none of the above
7) Which of the following is not a benefit of a typical IDE for C++?
-The syntax of your code is checked as you enter it.
-The debugging features make it easier for you to find bugs in your applications.
-The IDE helps you complete code as you type.
-Your code compiles and runs faster.
8) In an IDE, what tool do you use to enter and edit source code?
-debugger
-program builder
-compiler
-code editor
9) Which of the following is not a reason for learning C++?
Its syntax is easier to learn than the syntax of other languages like C# and Java.
It’s one of the fastest and most efficient languages available.
It’s an object-oriented language.
It’s designed to work with many operating systems and devices.
10) A syntax error occurs when
the C++ compiler can’t be located
the machine language can’t be interpreted properly
there’s a syntax error in a C++ statement
the program doesn’t contain a main() function
1.Ans. The source code for a program can include code from the C++ standard library. A source code is a code which is wrote by human easy to understand as it is written in high level languages.Now in a source code we use header files such as iostream.h(input output stream),math.h,stdlib.h etc these all are header files which are in the C++ standard library.
2.Ans. the code completion feature This feauture helps to identify and corrects errors which helps to save time.
3.Ans All the above The IDE provides the programmer to write the souce code in high level language C++ compile it into object code and also run it.
4.Ans. a and b only A console appllication is a text based interaction which takes input from user in text form an display the result in text form. GUI is not needed for this application to use.
5.Ans. Project An IDE Stores stores all the file of a program in project.It is a group of files that together forms a program.
6.Ans. Compiler compiles the source code HLL(High Level Language) into the object code /machine code(low Level language).
7.Ans. Your code compiles and runs faster In typical IDE for C++ code compilation and excution has to be perfect.Although it is great to run the program faster but it is better that code is optimised and run well.
8. Ans. Code Editor Programmer uses Code editor that helps to write and edit source code in a IDE.It is used to create programs or software.It helps to create coding for building of a program.
9.Ans. Its syntax is easier to learn than the syntax of other languages like C# and Java C++ is more complicated than that of Java .Java is easy to learn It as it is a easy high level langauage and its syntax is easier than C++.
10.Ans. there’s a syntax error in a C++ statement If the syntax while writting the code is there is a spelling mistake or a semicolon comma missing or any operator keywords missing.