C ++ PROGRAMS

Hello World Program:


Addition of two numbers:


Variable Declaration:


Loops:


Reading Input from the keyboard:


Addition of all Numbers from a text file:


String Functions:

  • append(): This function append a part of string to another string
  • assign(): This function assigns a partial string
  • at(): This function obtains the character stored at a specified location
  • begin(): This function returns a reference to the start of the string
  • capacity(): This function gives the total element that can be stored
  • compare(): This function compares string against the invoking string
  • empty(): This function returns true if the string is empty
  • end(): This function return a reference to the end of the string
  • erase(): This function remove character as specified
  • find(): This function searches for the occurrence of a specified sub string
  • length(): It gives the size of string or the number of elements of a string
  • swap(): This function swaps the given string with the invoking one

Writing to and Reading from a file:





Database Connectivity to MS SQL SERVER:




Retrieving Records from the table:



Inserting Records into the table:





Previous
« Prev Post