Code With SaiPradeep
A space for curious minds to explore software engineering, computer science, programming and technology. Learn. Explore. Understand.
Ko'proq ko'rsatish📈 Telegram kanali Code With SaiPradeep analitikasi
Code With SaiPradeep (@codewithsaipradeep) Ingliz til segmentidagi kanali faol ishtirokchi. Hozirda hamjamiyat 12 331 obunachidan iborat bo'lib, Texnologiyalar & Aralashmalar toifasida 10 226-o'rinni va Hindiston mintaqasida 31 277-o'rinni egallagan.
📊 Auditoriya ko‘rsatkichlari va dinamika
невідомо sanasidan buyon loyiha tez o‘sib, 12 331 obunachiga ega bo‘ldi.
11 Noyabr, 2026 dagi oxirgi ma’lumotlarga ko‘ra kanal barqaror faollikka ega. Oxirgi 30 kunda obunachilar soni -238 ga, so‘nggi 24 soatda esa -16 ga o‘zgardi va umumiy qamrov yuqori darajada qolmoqda.
- Tasdiqlash holati: Tasdiqlanmagan
- Jalb etish (ER): Auditoriya o‘rtacha 10.07% darajada jalb etiladi. Nashrdan keyingi dastlabki 24 soatda kontent odatda umumiy obunachilar sonining N/A% ini tashkil etuvchi reaksiyalarni to‘playdi.
- Post qamrovi: Har bir post o‘rtacha 1 242 marta ko‘riladi; birinchi sutkada odatda 0 ta ko‘rish yig‘iladi.
- Reaksiyalar va o‘zaro ta’sir: Auditoriya faol: har bir postga o‘rtacha 11 ta reaksiya keladi.
- Tematik yo‘nalishlar: Kontent input, string, scanf("%d, array, element kabi asosiy mavzularga jamlangan.
📝 Tavsif va kontent siyosati
Muallif resursni shaxsiy fikrni ifoda etish maydoni sifatida ta’riflaydi:
“A space for curious minds to explore software engineering, computer science, programming and technology.
Learn. Explore. Understand.”
Yuqori yangilanish chastotasi (oxirgi ma’lumot 12 Noyabr, 2026 da olingan) sababli kanal doimo dolzarb va katta qamrovli bo‘lib qoladi. Analitika auditoriya kontent bilan faol hamkorlik qilishini, uni Texnologiyalar & Aralashmalar toifasidagi muhim ta’sir nuqtasiga aylantirishini ko‘rsatadi.
#include <stdio.h>
#include <string.h>
#include <ctype.h>
int main() {
char str[100];
int i, is_digit_only = 1;
printf("Enter a string: ");
scanf("%s", str);
for (i = 0; str[i] != '0'; i++) {
if (!isdigit(str[i])) {
is_digit_only = 0;
break;
}
}
if (is_digit_only) {
printf("The string contains only digits.n");
} else {
printf("The string does not contain only digits.n");
}
return 0;
}
📤 Output:
Input: 12345 Output: The string contains only digits. Input: abc123 Output: The string does not contain only digits. Input: 9876 Output: The string contains only digits. Input: 12.34 Output: The string does not contain only digits. Input: Output: The string contains only digits.
// Code not available
📤 Output:
Because the code is not available, I cannot provide the output.
#include <stdio.h>
#include <string.h>
int main() {
char str[100];
char ch;
int i, last_occurrence = -1;
printf("Enter a string: ");
scanf("%s", str);
printf("Enter the character to find: ");
scanf(" %c", &ch);
for (i = 0; str[i] != '0'; i++) {
if (str[i] == ch) {
last_occurrence = i;
}
}
if (last_occurrence != -1) {
printf("Last occurrence of '%c' found at index: %dn", ch, last_occurrence);
} else {
printf("'%c' not found in the string.n", ch);
}
return 0;
}
📤 Output:
Input: hello Input: l Output: Last occurrence of 'l' found at index: 3 Input: banana Input: a Output: Last occurrence of 'a' found at index: 5 Input: world Input: z Output: 'z' not found in the string. Input: programming Input: g Output: Last occurrence of 'g' found at index: 8
#include <stdio.h>
#include <string.h>
int main() {
char str[100];
char ch;
int i;
int index = -1;
printf("Enter a string: ");
scanf("%s", str);
printf("Enter the character to find: ");
scanf(" %c", &ch);
for (i = 0; str[i] != '0'; i++) {
if (str[i] == ch) {
index = i;
break;
}
}
if (index != -1) {
printf("First occurrence of '%c' found at index: %dn", ch, index);
} else {
printf("'%c' not found in the string.n", ch);
}
return 0;
}
📤 Output:
Input: hello Input: l Output: First occurrence of 'l' found at index: 2 Input: world Input: z Output: 'z' not found in the string. Input: banana Input: a Output: First occurrence of 'a' found at index: 1 Input: test string Input: t Output: First occurrence of 't' found at index: 0 Input: test string Input: Output: ' ' not found in the string.
#include <stdio.h>
#include <string.h>
int main() {
char str[100];
int i, j = 0;
printf("Enter a string: ");
fgets(str, sizeof(str), stdin);
str[strcspn(str, "n")] = 0;
for (i = 0; str[i] != '0'; i++) {
if (str[i] != ' ') {
str[j] = str[i];
j++;
}
}
str[j] = '0';
printf("String after removing whitespaces: %sn", str);
return 0;
}
📤 Output:
Input: Hello World Output: String after removing whitespaces: HelloWorld Input: This is a test Output: String after removing whitespaces: Thisisatest Input: Leading and trailing spaces Output: String after removing whitespaces: Leadingandtrailingspaces Input: No spaces Output: String after removing whitespaces: Nospaces Input: Output: String after removing whitespaces:
#include <stdio.h>
#include <string.h>
#include <ctype.h>
int main() {
char str1[100], str2[100];
int freq1[26] = {0}, freq2[26] = {0};
int i;
printf("Enter first string: ");
scanf("%s", str1);
printf("Enter second string: ");
scanf("%s", str2);
if (strlen(str1) != strlen(str2)) {
printf("Strings are not anagrams.n");
return 0;
}
for (i = 0; str1[i] != '0'; i++) {
str1[i] = tolower(str1[i]);
freq1[str1[i] - 'a']++;
}
for (i = 0; str2[i] != '0'; i++) {
str2[i] = tolower(str2[i]);
freq2[str2[i] - 'a']++;
}
for (i = 0; i < 26; i++) {
if (freq1[i] != freq2[i]) {
printf("Strings are not anagrams.n");
return 0;
}
}
printf("Strings are anagrams.n");
return 0;
}
📤 Output:
Input: listen Input: silent Output: Strings are anagrams. Input: hello Input: world Output: Strings are not anagrams. Input: RaceCar Input: carraceR Output: Strings are anagrams. Input: abc Input: abcd Output: Strings are not anagrams.
#include <stdio.h>
#include <string.h>
#include <ctype.h>
int main() {
char str[100];
int count = 0;
int i;
printf("Enter a string: ");
fgets(str, sizeof(str), stdin);
// Remove trailing newline character
if (str[strlen(str) - 1] == 'n') {
str[strlen(str) - 1] = '0';
}
if (strlen(str) > 0) {
count = 1;
}
for (i = 0; str[i] != '0'; i++) {
if (str[i] == ' ' && isspace(str[i])) {
count++;
}
}
printf("Number of words: %dn", count);
return 0;
}
📤 Output:
Input: Hello World Output: Number of words: 2 Input: This is a test string. Output: Number of words: 5 Input: Leading space Output: Number of words: 2 Input: Trailing space Output: Number of words: 2 Input: Multiple spaces Output: Number of words: 3 Input: Output: Number of words: 0 Input: One Output: Number of words: 1
#include <stdio.h>
#include <string.h>
#include <ctype.h>
int main() {
char str[100];
int i;
printf("Enter a string: ");
scanf("%[^n]", str);
for (i = 0; str[i] != '0'; i++) {
str[i] = tolower(str[i]);
}
printf("Lowercase string: %sn", str);
return 0;
}
📤 Output:
Input: HeLlO wOrLd! Output: Enter a string: Lowercase string: hello world! Input: MiXeD cAsE sTrInG Output: Enter a string: Lowercase string: mixed case string Input: 123 AbCd Output: Enter a string: Lowercase string: 123 abcd Input: THIS IS ALL CAPS Output: Enter a string: Lowercase string: this is all caps Input: aBcDeFgHiJkLmNoPqRsTuVwXyZ Output: Enter a string: Lowercase string: abcdefghijklmnopqrstuvwxyz
#include <stdio.h>
#include <string.h>
#include <ctype.h>
int main() {
char str[100];
int i;
printf("Enter a string: ");
scanf("%[^n]", str);
for (i = 0; str[i] != '0'; i++) {
str[i] = toupper(str[i]);
}
printf("Uppercase string: %sn", str);
return 0;
}
📤 Output:
Input: hello world Output: Enter a string: Uppercase string: HELLO WORLD Input: MiXeD CaSe StRiNg Output: Enter a string: Uppercase string: MIXED CASE STRING Input: 123 abc Output: Enter a string: Uppercase string: 123 ABC
#include <stdio.h>
#include <string.h>
int main() {
char str1[100], str2[100];
printf("Enter the first string: ");
scanf("%s", str1);
printf("Enter the second string: ");
scanf("%s", str2);
int result = strcmp(str1, str2);
if (result == 0) {
printf("The strings are equal.n");
} else if (result < 0) {
printf("The first string is less than the second string.n");
} else {
printf("The first string is greater than the second string.n");
}
return 0;
}
📤 Output:
Input: apple Input: apple Output: The strings are equal. Input: apple Input: banana Output: The first string is less than the second string. Input: banana Input: apple Output: The first string is greater than the second string. Input: Hello Input: hello Output: The first string is less than the second string. Input: 123 Input: 1234 Output: The first string is less than the second string.
#include <stdio.h>
#include <string.h>
int main() {
char str1[100], str2[100];
printf("Enter the first string: ");
scanf("%s", str1);
printf("Enter the second string: ");
scanf("%s", str2);
strcat(str1, str2);
printf("Concatenated string: %sn", str1);
return 0;
}
📤 Output:
Input: Hello Input: World Output: Concatenated string: HelloWorld
#include <stdio.h>
#include <string.h>
int main() {
char str1[100];
char str2[100];
int i;
printf("Enter a string: ");
scanf("%99s", str1);
for (i = 0; str1[i] != '0'; i++) {
str2[i] = str1[i];
}
str2[i] = '0';
printf("Original string: %sn", str1);
printf("Copied string: %sn", str2);
return 0;
}
📤 Output:
Input: Hello, World! Output: Enter a string: Original string: Hello, Output: Copied string: Hello,
#include <stdio.h>
#include <string.h>
int main() {
char str[100];
int i, len;
printf("Enter a string: ");
scanf("%s", str);
len = strlen(str);
printf("Reversed string: ");
for (i = len - 1; i >= 0; i--) {
printf("%c", str[i]);
}
printf("n");
return 0;
}
📤 Output:
Input: Hello Output: Enter a string: Reversed string: olleH Input: Cprogramming Output: Enter a string: Reversed string: gnimmargorpC Input: 12345 Output: Enter a string: Reversed string: 54321 Input: A Output: Enter a string: Reversed string: A Input: Output: Enter a string: Reversed string:
#include <stdio.h>
#include <string.h>
#include <ctype.h>
int main() {
char str[100];
int i, len, isPalindrome = 1;
printf("Enter a string: ");
scanf("%s", str);
len = strlen(str);
for (i = 0; i < len / 2; i++) {
if (tolower(str[i]) != tolower(str[len - i - 1])) {
isPalindrome = 0;
break;
}
}
if (isPalindrome) {
printf("%s is a palindromen", str);
} else {
printf("%s is not a palindromen", str);
}
return 0;
}
📤 Output:
Input: madam Output: madam is a palindrome Input: racecar Output: racecar is a palindrome Input: Hello Output: Hello is not a palindrome Input: A man a plan a canal Panama Output: A is not a palindrome Input: WasItACarOrACatISaw Output: WasItACarOrACatISaw is not a palindrome Input: level Output: level is a palindrome Input: rotor Output: rotor is a palindrome Input: stats Output: stats is a palindrome Input: kayak Output: kayak is a palindrome Input: refer Output: refer is a palindrome
#include <stdio.h>
#include <string.h>
int main() {
char str[100];
int digits = 0, special = 0;
int i;
printf("Enter a string: ");
scanf("%[^n]", str);
for (i = 0; str[i] != '0'; i++) {
if (str[i] >= '0' && str[i] <= '9') {
digits++;
} else if ((str[i] >= '!' && str[i] <= '/') || (str[i] >= ':' && str[i] <= '@') ||
(str[i] >= '[' && str[i] <= ''') || (str[i] >= '{' && str[i] <= '~')) {
special++;
}
}
printf("Digits: %dn", digits);
printf("Special characters: %dn", special);
return 0;
}
📤 Output:
Input: Hello123!@#
Output: Digits: 3
Output: Special characters: 3
Input: abcDEF456$%^
Output: Digits: 3
Output: Special characters: 3
Input: 12345
Output: Digits: 5
Output: Special characters: 0
Input: Special!@#$%^&*()
Output: Digits: 0
Output: Special characters: 10
Input: mixedCase123.,;'[]{}
Output: Digits: 3
Output: Special characters: 9
Input: Just a normal string
Output: Digits: 0
Output: Special characters: 0
Input: This string has numbers and symbols: 123!@#
Output: Digits: 3
Output: Special characters: 3
Input: ""
Output: Digits: 0
Output: Special characters: 0
Input: 123~!@#
Output: Digits: 3
Output: Special characters: 3#include <stdio.h>
#include <string.h>
#include <ctype.h>
int main() {
char str[100];
int vowels = 0, consonants = 0;
int i;
printf("Enter a string: ");
fgets(str, sizeof(str), stdin);
// Remove trailing newline character
str[strcspn(str, "n")] = 0;
for (i = 0; str[i] != '0'; i++) {
char ch = tolower(str[i]);
if (isalpha(ch)) {
if (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u') {
vowels++;
} else {
consonants++;
}
}
}
printf("Vowels: %dn", vowels);
printf("Consonants: %dn", consonants);
return 0;
}
📤 Output:
Input: Hello World Output: Vowels: 3 Output: Consonants: 7 Input: Programming is fun Output: Vowels: 5 Output: Consonants: 11 Input: 123 abc DEF Output: Vowels: 1 Output: Consonants: 3 Input: AEIOUaeiou Output: Vowels: 10 Output: Consonants: 0 Input: QwRtY Output: Vowels: 1 Output: Consonants: 4
#include <stdio.h>
int main() {
char str[100];
int length = 0;
printf("Enter a string: ");
scanf("%s", str);
while (str[length] != '0') {
length++;
}
printf("Length of the string: %dn", length);
return 0;
}
📤 Output:
Input: Hello Output: Enter a string: Length of the string: 5 Input: This is a test Output: Enter a string: Length of the string: 4 Input: C programming Output: Enter a string: Length of the string: 1
#include <stdio.h>
#include <stdbool.h>
int main() {
int rows, cols, target;
printf("Enter the number of rows: ");
scanf("%d", &rows);
printf("Enter the number of columns: ");
scanf("%d", &cols);
int matrix[rows][cols];
printf("Enter the elements of the matrix (row-wise sorted):n");
for (int i = 0; i < rows; i++) {
for (int j = 0; j < cols; j++) {
scanf("%d", &matrix[i][j]);
}
}
printf("Enter the target element to search: ");
scanf("%d", &target);
int row = 0;
int col = cols - 1;
while (row < rows && col >= 0) {
if (matrix[row][col] == target) {
printf("Element found at (%d, %d)n", row, col);
return 0;
} else if (matrix[row][col] < target) {
row++;
} else {
col--;
}
}
printf("Element not foundn");
return 0;
}
📤 Output:
Input: 3 Input: 3 Input: 1 Input: 4 Input: 7 Input: 2 Input: 5 Input: 8 Input: 3 Input: 6 Input: 9 Input: 5 Output: Enter the number of rows: Enter the number of columns: Enter the elements of the matrix (row-wise sorted): Enter the target element to search: Element found at (1, 1)
#include <stdio.h>
int main() {
int rows, cols;
printf("Enter the number of rows: ");
scanf("%d", &rows);
printf("Enter the number of columns: ");
scanf("%d", &cols);
int matrix[rows][cols];
printf("Enter the elements of the matrix:n");
for (int i = 0; i < rows; i++) {
for (int j = 0; j < cols; j++) {
scanf("%d", &matrix[i][j]);
}
}
printf("Wave form traversal of the matrix:n");
for (int j = 0; j < cols; j++) {
if (j % 2 == 0) {
// Even column: Traverse top to bottom
for (int i = 0; i < rows; i++) {
printf("%d ", matrix[i][j]);
}
} else {
// Odd column: Traverse bottom to top
for (int i = rows - 1; i >= 0; i--) {
printf("%d ", matrix[i][j]);
}
}
}
printf("n");
return 0;
}
📤 Output:
Input: 3 Input: 4 Input: 1 Input: 2 Input: 3 Input: 4 Input: 5 Input: 6 Input: 7 Input: 8 Input: 9 Input: 10 Input: 11 Input: 12 Output: Enter the number of rows: Enter the number of columns: Enter the elements of the matrix: Wave form traversal of the matrix: 1 5 9 10 6 2 3 7 11 12 8 4
