Assignment No # 5: Ghulam Ishaq Khan Institute of Engineering Sciences and Technology

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Assignment‌‌No‌‌#‌‌5 

‌ ‌
 ‌

 ‌
 ‌

2021‌  ‌
CS‌‌101‌‌Lab‌  ‌
 ‌

Submitted‌‌by:Moeed‌‌Iftikhar‌  ‌
Registration‌‌No.‌‌:‌‌2021301‌  ‌
Class‌‌Section:‌‌F ‌ ‌
 ‌
   ‌
 ‌
“On‌‌my‌‌honor,‌‌as‌‌student‌‌of‌G‌ hulam‌‌Ishaq‌‌Khan‌‌Institute‌‌of‌‌Engineering‌‌Sciences‌‌and‌‌ 
Technology‌,‌‌I‌‌have‌‌neither‌‌given‌‌nor‌‌received‌‌unauthorized‌‌assistance‌‌on‌‌this‌‌academic‌‌work.”‌  ‌
 ‌
 ‌
 ‌
Submitted‌‌to:‌‌   ‌
Touseef‌‌Ur‌‌Rehman‌  ‌
 ‌   ‌ DATE‌  ‌

31/12/2021‌  ‌
 ‌
Question‌‌#1‌  ‌
Write‌‌a‌‌C++‌‌program‌‌to‌‌find‌‌the‌‌length‌‌of‌‌string‌  ‌
CODE:‌‌   ‌

 ‌
Output:‌  ‌

 ‌
Question‌‌#2‌  ‌
Write‌‌a‌‌program‌‌to‌‌compare‌‌two‌‌strings‌‌they‌‌are‌‌exact‌‌equal‌‌or‌‌not‌  ‌
CODE:‌  ‌
 ‌
Output:‌  ‌

 ‌
Question‌‌#3‌  ‌
Write‌‌a‌‌C++‌‌program‌‌to‌‌check‌‌a‌‌string‌‌is‌‌palindrome‌‌or‌‌not.‌‌A‌‌palindrome‌‌is‌‌a‌‌word,‌‌ 
number,‌  ‌
phrase,‌‌or‌‌other‌‌sequence‌‌of‌‌characters‌‌which‌‌reads‌‌the‌‌same‌‌backward‌‌as‌‌forward‌‌e.g‌‌ 
“Able‌  ‌
was‌‌I‌‌ere‌‌I‌‌saw‌‌Elba”‌‌or‌‌“Karak”‌‌etc.‌  ‌
Code:‌  ‌
 ‌
Output:‌  ‌

 ‌
Question‌‌#4‌  ‌
Write‌‌C++‌‌Program‌‌for‌‌Remove‌‌characters‌‌from‌‌the‌‌first‌‌string‌‌which‌‌are‌‌present‌‌in‌‌the‌‌ 
second‌  ‌
string‌  ‌
Code:‌  ‌
 ‌
Output:‌  ‌

 ‌
Question‌‌#5‌  ‌
Write‌‌a‌‌C++‌‌program‌‌to‌‌reverse‌‌a‌‌string‌‌using‌‌functions‌‌concept‌  ‌
Code:‌  ‌
 ‌
Output:‌  ‌

 ‌
Question‌‌#6‌  ‌
Write‌‌a‌‌C++‌‌program‌‌to‌‌concatenate‌‌one‌‌string‌‌contents‌‌to‌‌another‌  ‌
Code:‌  ‌
 ‌
Output:‌  ‌

 ‌
Question‌‌#7‌  ‌
Write‌‌a‌‌C++‌‌program‌‌to‌‌display‌‌string‌‌from‌‌backward‌  ‌
Code:‌  ‌

 ‌
Output:‌  ‌
 ‌
Question‌‌#8‌  ‌
Write‌‌a‌‌C++‌‌program‌‌to‌‌count‌‌words‌‌in‌‌strings.‌  ‌
Code:‌  ‌

 ‌
Output:‌  ‌
 ‌
 ‌
 ‌

You might also like