Software Development Exam  >  Software Development Notes  >  Basics of C++  >  Assignment: Input/Output

Assignment: Input/Output | Basics of C++ - Software Development PDF Download

Q1. Which is the correct statement to print the value of age?

#include <iostream>
using namespace std;
int main() {
    int age=19;

return 0;
}
  1. cout << "Age: %d",age;
  2. cout << "Age: %d" << age;
  3. cout << "Age: " + age;
  4. cout << "Age: " << age;
Assignment: Input/Output | Basics of C++ - Software Development  View Answer

4 (cout << "Age: " << age;)

Q2. What will be the output of following program?

#include <iostream>
using namespace std;
int main() {
    int a=20;
    cout<<::a;
    return 0;
}
1. 10
2. 20
3. ::10
4. ::20
Assignment: Input/Output | Basics of C++ - Software Development  View Answer

Correct Answer - 1

10
:: is a Scope Resolution Operator, it is used to access the value of global variable and ::a will return the value of global declared variable.

Q3. Which is the correct answer regarding '\n' and endl?

  1. Both are same.
  2. '\n' and endl both are used to print new line but endl flushes the buffer after printing new line.
  3. '\n' and endl both are used to print new line but '\n' flushes the buffer after printing new line.
  4. '\n' used in C programming while endl used in C++ programming.
Assignment: Input/Output | Basics of C++ - Software Development  View Answer

2. '\n' and endl both are used to print new line but endl flushes the buffer after printing new line. 


Q4. What will be the output of the following code?

#include <iostream> 

using namespace std;

int main() {    

cout << "hey my name is Rohan" ; 

}

Assignment: Input/Output | Basics of C++ - Software Development  View Answer

hey my name is Rohan

Q5. What will be the output of the following code ?

#include <iostream> 

using namespace std; 

int main(){ 

cout << "career" << "labs"; 

}

Assignment: Input/Output | Basics of C++ - Software Development  View Answer

careerlabs

The document Assignment: Input/Output | Basics of C++ - Software Development is a part of the Software Development Course Basics of C++.
All you need of Software Development at this link: Software Development
70 videos|45 docs|15 tests

Top Courses for Software Development

FAQs on Assignment: Input/Output - Basics of C++ - Software Development

1. What is Input/Output software development?
Ans. Input/Output software development refers to the process of creating programs that manage the input and output operations of a computer system. This includes handling data coming into the system from various sources (input) and sending data out of the system to different destinations (output).
2. Why is Input/Output software development important in computer systems?
Ans. Input/Output software development is crucial in computer systems as it enables the communication between the hardware components and the software applications. It allows users to interact with the computer system by providing input and receiving output, making it an essential part of the overall functionality of the system.
3. What are some common examples of Input/Output operations in software development?
Ans. Some common examples of Input/Output operations in software development include reading data from a file, writing data to a database, displaying information on a screen, and receiving user input from a keyboard or mouse. These operations are fundamental in creating responsive and interactive software applications.
4. How does Input/Output software development impact the performance of a computer system?
Ans. Efficient Input/Output software development can significantly impact the performance of a computer system by optimizing data transfer rates, reducing latency in input/output operations, and improving overall system responsiveness. Poorly designed Input/Output software can lead to bottlenecks and performance issues in the system.
5. What are some best practices to follow in Input/Output software development?
Ans. Some best practices in Input/Output software development include using asynchronous I/O operations to improve performance, handling errors gracefully to ensure robustness, optimizing data transfer methods for efficiency, and considering security measures to protect data during input and output operations. Following these practices can lead to the development of high-quality and reliable software systems.
70 videos|45 docs|15 tests
Download as PDF
Explore Courses for Software Development exam

Top Courses for Software Development

Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

Important questions

,

practice quizzes

,

mock tests for examination

,

Semester Notes

,

pdf

,

Extra Questions

,

Summary

,

past year papers

,

Free

,

Assignment: Input/Output | Basics of C++ - Software Development

,

Previous Year Questions with Solutions

,

Sample Paper

,

Objective type Questions

,

shortcuts and tricks

,

ppt

,

study material

,

Assignment: Input/Output | Basics of C++ - Software Development

,

Exam

,

video lectures

,

MCQs

,

Assignment: Input/Output | Basics of C++ - Software Development

,

Viva Questions

;