es
Feedback
C Programming Codes

C Programming Codes

Ir al canal en Telegram

C Programming Codes || Quizzes || DSA Learn along with the community Any queries admin - @Pradeep_saii

Mostrar más

📈 Análisis del canal de Telegram C Programming Codes

El canal C Programming Codes (@c_programming_codes) en el segmento lingüístico de Inglés es un actor destacado. Actualmente la comunidad reúne a 13 383 suscriptores, ocupando la posición 9 569 en la categoría Tecnologías y Aplicaciones y el puesto 31 996 en la región India.

📊 Métricas de audiencia y dinámica

Desde su creación el невідомо, el proyecto ha mostrado un crecimiento acelerado, reuniendo a 13 383 suscriptores.

Según los últimos datos del 15 junio, 2026, el canal mantiene una actividad estable. En los últimos 30 días la variación de miembros fue de -238, y en las últimas 24 horas de -13, conservando un alto alcance.

  • Estado de verificación: No verificado
  • Tasa de interacción (ER): El promedio de interacción de la audiencia es 9.80%. Durante las primeras 24 horas tras publicar, el contenido suele obtener N/A% de reacciones respecto al total de suscriptores.
  • Alcance de las publicaciones: Cada publicación recibe en promedio 0 visualizaciones. En el primer día suele acumular 0 visualizaciones.
  • Reacciones e interacción: La audiencia responde de forma activa: el promedio de reacciones por publicación es 0.
  • Intereses temáticos: El contenido se centra en temas clave como input, string, scanf("%d, array, element.

📝 Descripción y política de contenido

El autor describe el recurso como un espacio para expresar opiniones subjetivas:
C Programming Codes || Quizzes || DSA Learn along with the community Any queries admin - @Pradeep_saii

Gracias a la alta frecuencia de actualizaciones (últimos datos recibidos el 16 junio, 2026), el canal mantiene la vigencia y un amplio alcance. La analítica demuestra que la audiencia interactúa activamente con el contenido, lo que lo convierte en un punto de referencia dentro de la categoría Tecnologías y Aplicaciones.

13 383
Suscriptores
-1324 horas
-627 días
-23830 días
Archivo de publicaciones
Leetcode 189: https://leetcode.com/problems/rotate-array/
#include <vector>
#include <iostream>

class Solution {
public:
    void rotate(std::vector<int>& nums, int k) {
        k = k % nums.size();
        // Reversing the whole array
        reverseNumsArr(nums, 0, nums.size());
        // Reversing first k elements
        reverseNumsArr(nums, 0, k);
        // Reversing remaining elements
        reverseNumsArr(nums, k, nums.size());
    }

private:
    void reverseNumsArr(std::vector<int>& nums, int start, int end) {
        end--; // Adjusting end to be the last index
        while (start < end) {
            std::swap(nums[start], nums[end]);
            start++;
            end--;
        }
    }
};

Leetcode 122: https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/
class Solution {
public:
    int maxProfit(vector<int>& prices) {
        int maxProfit = 0;
        for(int i = 0; i < prices.size() - 1; i++) {
            if(prices[i] < prices[i + 1]) {
                int diff = prices[i + 1] - prices[i];
                maxProfit += diff;
            }
        }
        return maxProfit;
    }
};

Leetcode 26: https://leetcode.com/problems/remove-duplicates-from-sorted-array/description/
class Solution {
public:
    int removeDuplicates(vector<int>& nums) {
        int lastUniqueElementIdx = 0;

        for (int i = 1; i < nums.size(); i++) {
            if (nums[lastUniqueElementIdx] != nums[i]) {
                nums[lastUniqueElementIdx + 1] = nums[i];
                lastUniqueElementIdx++;
            }
        }
        return lastUniqueElementIdx + 1;
    }
};

Amazing free courses are out guys checkout 👇👇👇 https://t.me/udemy_course_4u

Program: Searching in a 2D array.
#include <iostream>
using namespace std;

int* search(int arr[][3], int rows, int cols, int target) {
    static int result[2]; 
    result[0] = -1;
    result[1] = -1;

    for (int i = 0; i < rows; i++) {
        for (int j = 0; j < cols; j++) {
            if (arr[i][j] == target) {
                result[0] = i;
                result[1] = j;
                return result; 
            }
        }
    }
    return result; 
}

int main() {
    int arr[3][3] = {
        {20, 45, 10},
        {32, 26, 22},
        {47, 98, 37}
    };

    int target;
    cout << "Enter target element: ";
    cin >> target;

    int* result = search(arr, 3, 3, target);
    
    if (result[0] != -1) {
        cout << "Element found at index (" << result[0] << "," << result[1] << ")" << endl;
    } else {
        cout << "Element not found" << endl;
    }

    return 0;
}
#linearsearch

Program: Finding maximum element from an array.
#include <iostream>
using namespace std;

int findMax(int arr[], int size) {
    int max = arr[0];
    for (int i = 1; i < size; i++) {
        if (arr[i] > max) {
            max = arr[i];
        }
    }
    return max;
}

int main() {
    int arr[] = {12, 32, 23, 11, 39};
    int size = sizeof(arr) / sizeof(arr[0]);
    int maxNumber = findMax(arr, size);
    cout << "Maximum number in array: " << maxNumber << endl;
    return 0;
}

Program: Finding minimum element in an array.
#include <iostream>
using namespace std;

int findMin(int arr[], int size) {
    int min = arr[0];
    for (int i = 1; i < size; i++) {
        if (arr[i] < min) {
            min = arr[i];
        }
    }
    return min;
}

int main() {
    int arr[] = {12, 32, 23, 11, 39};
    int size = sizeof(arr) / sizeof(arr[0]);
    int minNumber = findMin(arr, size);
    cout << "Minimum number in array: " << minNumber << endl;
    return 0;
}

Program: Searching for a character in specified range.
#include <iostream>
#include <string>

using namespace std;

int searchInStr(const string &str, char ch, int start, int end) {
    for (int i = start; i <= end; i++) {
        if (str[i] == ch) {
            return i;
        }
    }
    return -1;
}

int main() {
    string str = "Java Programming";
    char ch;
    int start, end;
    
    cout << "Enter character to search: ";
    cin >> ch;
    
    cout << "Enter the range,\n";
    cout << "Enter the start index: ";
    cin >> start;
    cout << "Enter the end index: ";
    cin >> end;
    
    int res = searchInStr(str, ch, start, end);
    
    if (res == -1) {
        cout << "Character not found in the specified range" << endl;
    } else {
        cout << "Character is at index " << res << endl;
    }
    
    return 0;
}

Program: Searching for first occurrence of a character in a string.
#include <iostream>
using namespace std;

int searchInStr(string str, char ch) {
    for (int i = 0; i < str.length(); i++) {
        if (str[i] == ch) {
            return i;
        }
    }
    return -1;
}

int main() {
    string str = "Java Programming";
    char ch;
    cout << "Enter character to search: ";
    cin >> ch;
    int res = searchInStr(str, ch);
    if (res == -1) {
        cout << "Character not found in the String" << endl;
    } else {
        cout << "Character is at index " << res << endl;
    }
    return 0;
}

Program: Reversing of an Array.
#include <iostream>
#include <vector>
using namespace std;

void reverseArray(vector<int>& arr) {
    int n = arr.size();
    for (int i = 0; i < n / 2; i++) {
        swap(arr[i], arr[n - 1 - i]);
    }
}

int main() {
    vector<int> arr = {1, 2, 3, 4, 5, 6};
    reverseArray(arr);

    for (size_t i = 0; i < arr.size(); i++) {
        cout << arr[i] << " ";
    }
    cout << endl;

    return 0;
}

Program : Finding Maximum element in an Array.
#include <iostream>
using namespace std;

int findMax(int arr[], int size) {
    int maxElem = arr[0];
    for(int i = 1; i < size; i++) {
        if(maxElem < arr[i]) {
            maxElem = arr[i];
        }
    }
    return maxElem;
}

int main() {
    int arr[] = {10, 5, 1, 3, 6};
    int size = sizeof(arr) / sizeof(arr[0]);
    int maxElem = findMax(arr, size);
    cout << "Maximum Element : " << maxElem << endl;
    return 0;
}

🚨🚨🚨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

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;
}

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;
}

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;
}

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;
}

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;
}

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;
}

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;
}

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;
}