2023 2024 Student Forum > Management Forum > Entrance Exams

 
  #2  
23rd July 2018, 12:15 PM
Unregistered
Guest
 
Re: Anna University Data Structures Lab Manual for CSE

I want the Programming and Data Structures II Laboratory Manual of B.Tech CSE 3rd SEM of Anna University so can you provide me?
  #3  
23rd July 2018, 12:16 PM
Super Moderator
 
Join Date: Aug 2012
Re: Anna University Data Structures Lab Manual for CSE

I am providing you the Programming and Data Structures II Laboratory Manual of B.Tech CSE 3rd SEM of Anna University

Anna University B.Tech CSE 3rd SEM Programming and Data Structures II Laboratory Manual

EX NO: 1 SIMPLE C++ PROGRAM

AIM:

To implement a simple C++ program to display the name and number

ALGORITHM:

Step 1: Include the header files

Step 2: Declare the class as person with data members name and number

Step 3: Create an object for the class person

Step 4: Get the name and number as input

Step 5: Access the data member using object and display the output.

PROGRAM:

#include

#include

using namespace std;

class person

{

public: string name; int number;

};

int main()

{

person obj;

cout Enter the Name :;

cin obj.name; cout Enter the Number :;

cin obj.number;

cout obj.name : obj.number endl;

getch();

return 0;

}

SAMPLE OUTPUT:

Enter the Name: Byron

Enter the Number: 100

Byron: 100

RESULT:

Thus the simple C++ program to display the name and number is implemented successfully.

Contact-

Anna University
Kotturpuram
Chennai, Tamil Nadu


Quick Reply
Your Username: Click here to log in

Message:
Options




All times are GMT +5. The time now is 11:12 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
SEO by vBSEO 3.6.0 PL2

1 2 3 4