C , C++ PROGRAMMING LANGUAGES WITH DSA ๐Ÿ’ป @c_cpp_programming_language_dsa Channel on Telegram

C , C++ PROGRAMMING LANGUAGES WITH DSA ๐Ÿ’ป

@c_cpp_programming_language_dsa


We provide programs/materials which you can refer for interviews
Disclaimer-
NO COPYRIGHT CONTENT IS UPLOADED HERE
THIS IS ONLY FOR EDUCATIONAL PURPOSE

#c_programming_language
#cpp #dsa #datastructuresalgorithms
#faang #c++

C , C++ PROGRAMMING LANGUAGE WITH DSA ๐Ÿ’ป (English)

Are you looking to enhance your programming skills in C and C++ while diving into the world of Data Structures and Algorithms? Look no further than the Telegram channel 'C , C++ PROGRAMMING LANGUAGE WITH DSA ๐Ÿ’ป'! Managed by the knowledgeable and experienced user @Pradeep_saii, this channel is dedicated to providing educational content on C programming language, C++, and DSA

Whether you are a beginner looking to learn the basics of programming or an experienced coder wanting to delve deeper into data structures and algorithms, this channel has something for everyone. From tutorials and coding exercises to tips and tricks, you will find a wealth of resources to help you improve your skills

It is essential to note that all content shared on this channel is for educational purposes only, and no copyrighted material is uploaded here. So you can rest assured that you are learning in a safe and legal environment

Join the 'C , C++ PROGRAMMING LANGUAGE WITH DSA ๐Ÿ’ป' Telegram channel today and take your programming knowledge to the next level! Don't miss out on this valuable opportunity to learn and grow in the world of software development. #c_programming_language #cpp #dsa #datastructuresalgorithms #faang

C , C++ PROGRAMMING LANGUAGES WITH DSA ๐Ÿ’ป

07 Feb, 08:57


๐Ÿšจ๐Ÿšจ๐ŸšจFree Udemy Courses

Guys join this channel if you want any courses like c,cpp, java and other technical stuff. stay active in channel by unmuting it and enroll to the course as soon as they are posted .
It's really worth guys don't miss
๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡

https://t.me/udemy_course_4u

C , C++ PROGRAMMING LANGUAGES WITH DSA ๐Ÿ’ป

06 Feb, 13:41


Program : Armstrong or Not
#include <iostream>
#include <cmath>
using namespace std;

bool isArmstrong(int num) {
int originalNum = num, sum = 0, digits = to_string(num).length();
while (num > 0) {
int rem = num % 10;
sum += pow(rem, digits);
num /= 10;
}
return originalNum == sum;
}

int main() {
int num;
cout << "Enter any number: ";
cin >> num;

if (isArmstrong(num)) {
cout << num << " is an Armstrong number." << endl;
} else {
cout << num << " is not an Armstrong number." << endl;
}
return 0;
}

C , C++ PROGRAMMING LANGUAGES WITH DSA ๐Ÿ’ป

06 Feb, 13:09


Program : Prime or Not
#include <iostream>
using namespace std;

bool isPrime(int num) {
if (num < 2) {
return false;
}
for (int i = 2; i * i <= num; i++) {
if (num % i == 0) {
return false;
}
}
return true;
}

int main() {
int num;
cout << "Enter any number: ";
cin >> num;
if (isPrime(num)) {
cout << num << " is a prime number" << endl;
} else {
cout << num << " is not a prime number" << endl;
}
return 0;
}

C , C++ PROGRAMMING LANGUAGES WITH DSA ๐Ÿ’ป

04 Feb, 15:13


Program: Reversing of a number.
#include <iostream>
using namespace std;

int reverseNumber(int num) {
int reversedNum = 0;
while (num > 0) {
int rem = num % 10;
reversedNum = reversedNum * 10 + rem;
num /= 10;
}
return reversedNum;
}

int main() {
int num;
cout << "Enter the number to reverse: ";
cin >> num;
int reversedNum = reverseNumber(num);
cout << "Reverse of " << num << " is " << reversedNum << endl;
return 0;
}

C , C++ PROGRAMMING LANGUAGES WITH DSA ๐Ÿ’ป

04 Feb, 14:59


Program: Counting Occurrences of a digit in a number.
#include <iostream>
using namespace std;

int countOccurrences(int number, int targetDigit) {
int count = 0;
while (number > 0) {
int lastDigit = number % 10;
if (lastDigit == targetDigit) {
count++;
}
number /= 10;
}
return count;
}

int main() {
int number, targetDigit;
cout << "Enter a number: ";
cin >> number;
cout << "Enter the digit to count occurrences of: ";
cin >> targetDigit;
int result = countOccurrences(number, targetDigit);
cout << "The digit " << targetDigit << " appears " << result << " times in " << number << "." << endl;

return 0;
}

C , C++ PROGRAMMING LANGUAGES WITH DSA ๐Ÿ’ป

03 Feb, 14:05


Program : Nth Fibonacci Number
#include <iostream>
using namespace std;
int fibonacci(int n) {
int a = 0, b = 1, temp;
if (n == 0) return a;
for (int count = 2; count <= n; count++) {
temp = b;
b = a + b;
a = temp;
}
return b;
}
int main() {
int n;
cout << "Enter the value of n: ";
cin >> n;
cout << n << "th Fibonacci number is: " << fibonacci(n) << endl;
return 0;
}

C , C++ PROGRAMMING LANGUAGES WITH DSA ๐Ÿ’ป

03 Feb, 13:39


Program : Nth Fibonacci Number
#include <iostream>
using namespace std;
int fibonacci(int n) {
int a = 0, b = 1, temp;
if (n == 0) return a;
for (int count = 2; count <= n; count++) {
temp = b;
b = a + b;
a = temp;
}
return b;
}
int main() {
int n;
cout << "Enter the value of n: ";
cin >> n;
cout << n << "th Fibonacci number is: " << fibonacci(n) << endl;
return 0;
}

C , C++ PROGRAMMING LANGUAGES WITH DSA ๐Ÿ’ป

03 Feb, 13:12


Program : Check case of inputted character.
#include <iostream>
using namespace std;


void checkCase(char ch) {
if(ch >= 'a' && ch <= 'z'){
cout << "Entered character is in lower case" << endl;
}
else if(ch >= 'A' && ch <= 'Z'){
cout << "Entered character is in upper case" << endl;
}
else{
cout << "Invalid character entered" << endl;
}
}

int main() {
cout << "Enter any character: ";
char ch;
cin >> ch;
checkCase(ch);
return 0;
}

C , C++ PROGRAMMING LANGUAGES WITH DSA ๐Ÿ’ป

03 Feb, 12:43


Program : Largest of Three numbers using functions.
#include <iostream>
using namespace std;

int largestOfThree(int a, int b, int c) {
int largest = a;
if(b > largest)
largest = b;
if(c > largest)
largest = c;
return largest;
}

int main() {
int first, second, third;
cout << "Enter any three numbers: ";
cin >> first >> second >> third;

int large = largestOfThree(first, second, third);
cout << "Largest number among " << first << ", " << second << ", "
<< third << " is: " << large << endl;

return 0;
}

C , C++ PROGRAMMING LANGUAGES WITH DSA ๐Ÿ’ป

02 Feb, 13:45


Method Overloading
cpp
#include <iostream>
using namespace std;

int area(int side) {
return side * side;
}

int area(int length, int breadth) {
return length * breadth;
}

int main() {
int side,length,breadth;
cout << "Enter a side length of a square:" << endl;
cin >> side;
cout << "Enter length and breadth of rectangle:" << endl;
cin >> length >> breadth;
cout << "Area of square: " << area(side) << endl;
cout << "Area of rectangle: " << area(length, breadth) << endl;
return 0;
}

C , C++ PROGRAMMING LANGUAGES WITH DSA ๐Ÿ’ป

02 Feb, 13:39


Pass by Reference
#include <iostream>
using namespace std;

void passByReference(int& x) {
x = 20;
}

int main() {
int a = 10;
cout << "Value of a before function call: " << a << endl;
passByReference(a);
cout << "Value of a after function call: " << a << endl;
return 0;
}

C , C++ PROGRAMMING LANGUAGES WITH DSA ๐Ÿ’ป

02 Feb, 13:36


Pass by Value Program
#include <iostream>
using namespace std;

void passByValue(int x) {
x = 20;
}

int main() {
int a = 10;
cout << "Value of a before function call: " << a << endl;
passByValue(a);
cout << "Value of a after function call: " << a << endl;
return 0;
}

C , C++ PROGRAMMING LANGUAGES WITH DSA ๐Ÿ’ป

01 Feb, 12:15


Program : Write a function to find maximum of two numbers.
#include <iostream>

using namespace std;
int findMax(int n1 , int n2){
if(n1 > n2){
return n1;
}
return n2;
}

int main() {
int num1,num2;
cout << "Enter any two different numbers:"<<endl;
cin >> num1 >> num2;
int max = findMax(num1,num2);
cout << "Maximum of "<< num1 << " and " << num2 << " is " << max;
return 0;
}

C , C++ PROGRAMMING LANGUAGES WITH DSA ๐Ÿ’ป

31 Jan, 12:27


Program : Sum on n natural numbers using do while loop.
#include <iostream>

using namespace std;

int main() {
int n,sum=0,i=1;
cout << "Enter the value of n:";
cin >> n;
do{
sum = sum + i;
i++;
}while(i <= n);
cout << "Sum of "<< n << " natural numbers :" << sum;
}

C , C++ PROGRAMMING LANGUAGES WITH DSA ๐Ÿ’ป

31 Jan, 12:12


Program : Design a number guessing game using while loop.
Take range of numbers from 1 - 10
hard code any number between 1 and 10
Ask user to guess the number after guessing display number of attempts made to guess the number.
cpp
#include <iostream>

using namespace std;

int main()
{
int numberToGuess = 4;
int attempts = 0;
int guess = 0;
while (guess != numberToGuess)
{
cout << "Guess the number between 1 and 10:" << endl;
cin >> guess;
attempts++;
if(guess == numberToGuess){
cout << "You guessed it right in " << attempts << " attempts" << endl;
}
}
cout << "Game ended";
return 0;
}

C , C++ PROGRAMMING LANGUAGES WITH DSA ๐Ÿ’ป

31 Jan, 11:31


Program: Given an array with numbers 11,12,13,14,15 calculate the sum of elements in array using range based for loop.
cpp
#include <iostream>

using namespace std;

int main(){
int numbers[] = {11,12,13,14,15};
int sum = 0;
for(int number : numbers){
sum = sum + number;
}
cout << "Sum = "<< sum;
return 0;
}

C , C++ PROGRAMMING LANGUAGES WITH DSA ๐Ÿ’ป

31 Jan, 11:01


Program : To calculate factorial of a given number
cpp
#include <iostream>

using namespace std;

int main() {
int num,res=1;
cout << "Enter a positive number:" << endl;
cin >> num;
if(num < 0){
cout << "You entered a negative number" << endl;
}
else if(num == 0){
cout << "0! = " << "1";
}
else{
for(int i = 1;i <= num;i++){
res = res * i;
}
cout << "Factorial of " << num << " is "<<res;
}

return 0;
}

C , C++ PROGRAMMING LANGUAGES WITH DSA ๐Ÿ’ป

29 Jan, 06:28


Program: Implement a calculator using a switch case.
#include <iostream>
using namespace std;

int main() {
char op;
double num1, num2;
cout << "Enter an operator (+, -, *, /): ";
cin >> op;

cout << "Enter two numbers: ";
cin >> num1 >> num2;

switch (op) {
case '+': cout << "Result: " << num1 + num2 << endl; break;
case '-': cout << "Result: " << num1 - num2 << endl; break;
case '*': cout << "Result: " << num1 * num2 << endl; break;
case '/':
if (num2 != 0)
cout << "Result: " << num1 / num2 << endl;
else
cout << "Error! Division by zero." << endl;
break;
default: cout << "Invalid operator!" << endl;
}

return 0;
}

C , C++ PROGRAMMING LANGUAGES WITH DSA ๐Ÿ’ป

29 Jan, 06:07


Program: Check if a given year is a leap year.
#include <iostream>
using namespace std;

int main() {
int year;
cout << "Enter a year: ";
cin >> year;

if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
cout << year << " is a Leap Year." << endl;
else
cout << year << " is not a Leap Year." << endl;

return 0;
}

C , C++ PROGRAMMING LANGUAGES WITH DSA ๐Ÿ’ป

29 Jan, 05:47


Program: Find the largest of three numbers using if-else.

#include <iostream>
using namespace std;

int main() {
int a, b, c;
cout << "Enter three numbers: ";
cin >> a >> b >> c;

if (a >= b && a >= c)
cout << "Largest number is: " << a << endl;
else if (b >= a && b >= c)
cout << "Largest number is: " << b << endl;
else
cout << "Largest number is: " << c << endl;

return 0;
}

C , C++ PROGRAMMING LANGUAGES WITH DSA ๐Ÿ’ป

25 Jan, 01:52


Program for rolling dice.
#include <iostream>
#include <cstdlib>
#include <ctime>

using namespace std;
int main() {
int result;
const short maxValue = 6;
const short minValue = 1;
srand(time(nullptr));
result = (rand() % (maxValue - minValue + 1)) + minValue;
cout << result;
return 0;
}

C , C++ PROGRAMMING LANGUAGES WITH DSA ๐Ÿ’ป

24 Jan, 14:54


Program to calculate area of circle.
#include <iostream>
#include <cmath>

using namespace std;
int main() {
double radius;
double area;
const double PI = 3.14;
cout << "Enter the radius of the circle: ";
cin >> radius;
area = PI * pow(radius,2);
cout << "Area of circle: "<< area;
return 0;
}

C , C++ PROGRAMMING LANGUAGES WITH DSA ๐Ÿ’ป

24 Jan, 14:42


Program to convert temperature from Fahrenheit to Celsius.
#include <iostream>
using namespace std;
int main() {
double fahrenheitTemperature;
double temperatureInCelsius;
cout << "Enter your temperature in Fahrenheit:";
cin >> fahrenheitTemperature;
temperatureInCelsius = ((fahrenheitTemperature - 32) * 5) / 9;
cout << "Temperature in celsius : " << temperatureInCelsius;
return 0;
}

C , C++ PROGRAMMING LANGUAGES WITH DSA ๐Ÿ’ป

24 Jan, 13:16


Program to swap values of two variables.
#include <iostream>

int main() {
int a=1;
int b=2;
int temp;
std::cout << "Before Swapping:\n";
std::cout << "a=" << a <<",b=" << b <<"\n";
temp = a;
a=b;
b=temp;
std::cout << "After Swapping:\n";
std::cout << "a=" << a <<",b=" << b <<"\n";
return 0;
}

C , C++ PROGRAMMING LANGUAGES WITH DSA ๐Ÿ’ป

24 Jan, 12:09


Printing Hello World
#include <iostream>

int main() {
std::cout << "Hello World";
return 0;
}

C , C++ PROGRAMMING LANGUAGES WITH DSA ๐Ÿ’ป

24 Jan, 12:09


๐Ÿ’ป C++ Codes , Along with DSA ๐Ÿ’ป

C , C++ PROGRAMMING LANGUAGE WITH DSA ๐Ÿ’ป

23 May, 16:02


Join our other channels๐Ÿ‘‡

Grab Your Deal ๐Ÿค
๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡
https://t.me/deals_ultimate_ajioo

Best Student Deals๐Ÿ”ฅ
๐Ÿ‘‰https://t.me/student_deals_loots

C Programming Discussion group
๐Ÿ‘‰https://t.me/C_programming_language_group

Amazing content on c++ is going to come stay tuned ๐Ÿ‘

C , C++ PROGRAMMING LANGUAGE WITH DSA ๐Ÿ’ป

13 May, 13:53


#include <stdio.h>

int main() {
int x = 10;
int *ptr = &x;
*ptr = 20;
printf("%d\n", x);
return 0;
}

C , C++ PROGRAMMING LANGUAGE WITH DSA ๐Ÿ’ป

15 Apr, 12:47



#include <stdio.h>
int main() {
int x = 5;
printf("%d", x++);
return 0;
}

C , C++ PROGRAMMING LANGUAGE WITH DSA ๐Ÿ’ป

19 Mar, 12:34


โฉ
Join our c programming community ๐Ÿ‘‡

https://t.me/C_programming_language_group

Be the first to help others ๐Ÿ‘

C , C++ PROGRAMMING LANGUAGE WITH DSA ๐Ÿ’ป

28 Dec, 13:12


@c_programming_language_programs