A

@Adarsh222

String palindrome

C
4 years ago
#include <stdio.h> #include <string.h> int main() { char str[10]; scanf("%s",str); int len = strlen(str); for(int i = 0; i < len/2; i++) {

Length of string

C
4 years ago
#include <stdio.h> int main() { char a[100]; int i,b; printf("Enter the string \n"); scanf("%s",a); for(i=0;a[i]!='\0';i++){ b++;

String replace

C
4 years ago
#include <stdio.h> #include <string.h> int main() { char str[] = "Nagpur"; str[0]='K'; printf("%s, ", str); strcpy(str, "Kanpur"); printf("%s", str+1);

Dynamic memory allocation and reverse no

C
4 years ago
#include <stdio.h> #include <stdlib.h> int main() { int *arr,*ar,i,n=5; arr = (int*)malloc(n*(sizeof(int))); ar = (int*)malloc(n*(sizeof(int))); for(i=0;i<n;i++){

Swap variables with pointers

C
4 years ago
#include <stdio.h> /* Swaps the values of two integers */ void swap(int *var1, int *var2){ int tmp = *var1; *var1 = *var2; *var2 = tmp; } int main(){

String sort RW

C
4 years ago
#include <stdio.h> int main(){ char a[25][25];//[NUM_STRINGS][MAX_LENGTH] // row-- // -- coulmn ||| // -- int i,j; for(i=0;i<5;i++){ scanf("%s",a[i]);

Char sort RW

C
4 years ago
#include <stdio.h> #if 0 int main(){ char a[25],b[25][25]; int i,j,k; for(i=0;i<5;i++){ scanf("%c",&a[i]); }

add 2 50 dig no's

C
4 years ago
#include <stdio.h> #include <string.h> #include <ctype.h> void print(char *a, int l); int read(char *a); int sum(char *a, char* b, char * c, int al, int bl); int main(void) { char a[1000], b[1000], c[1000]; //a and b hold the input numbers and c hold the output number. Each array entry is a digit int al, bl; //for storing the number of digits of the two input numbers