A

@Adarsh222

delete an char

C
4 years ago
#include <stdio.h> #include <string.h> #if 0 int main(){ char str[]="adarsh"; int a=strlen(str); printf("%d\n",a); for(int i=0;str[i]!='\0';i++){ if(str[i]=='a'){ for(int j=i;str[j]!='\0';j++){

Remove Characters in String Except Alphabets

C
4 years ago
#include <stdio.h> int main() { char line[150]; printf("Enter a string: "); fgets(line, sizeof(line), stdin); // take input //int j; for (int i = 0,j; line[i] != '\0'; ++i) {

delete

C
4 years ago
#include <stdio.h> #include <string.h> void delchar(char *x,int a, int b); int main() { char string[10]; int n,pos,p; //clrscr();

Linkedlist pgm

C
4 years ago
#include <stdio.h> #include <stdlib.h> #include <string.h> struct node{ int data; char str[10];//char *str; and we can avoid strcpy but its not proper way struct node *next; };

snprintf

C
4 years ago
// C program to demonstrate snprintf() #include <stdio.h> int main() { char buffer[50]; char* s = "geeksforgeeks"; // Counting the character and storing // in buffer using snprintf

functionptr

C
4 years ago
#include <stdio.h> //function pointer typedef int(calfun)(int *a,int *b); int callcalfun(calfun *p,int *a,int *b){ return (p(a,b)); } int add(int *a,int *b){ *a=*a+*b;

Very important code

C
4 years ago
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <inttypes.h> #include <pthread.h> #include <time.h> #include <unistd.h> #include <fcntl.h> #include <ctype.h> #include<stdbool.h>

memset

C
4 years ago
#include <stdio.h> #include <string.h> #include <stdlib.h> #if 0 int main() { int arr[5]; // Initialize the entire array to zeros

***pointer

C
4 years ago
#include <stdio.h> int main() { int a =10; printf("the current value of a is %d",a); int *p = &a; printf("\nthe address of a and value of p is %d",p); *p = 20; printf("\nvalue of a is %d",a);

pointer imp

C
4 years ago
*p=&a //integer *p //to get the value *p=a //string *(a+1) inside an array p //to get the value

pointers mcq

C
4 years ago
//https://www.tutorialspoint.com/cprogramming/cprogramming_online_quiz.htm #if 0 #include <stdio.h> void main() { int a[3] = {1, 2, 3}; int *p = a; //address of p=a then printf("%p\t%p", p, a); //0x7ffeffb2f6

Remove a perticuler char from a string

C
4 years ago
#include <stdio.h> #include <string.h> char removech(char* a,char b); int main() { char a[12]; char b; scanf("%s\n",a);// important is \n

getkey

C
4 years ago
#include <TestCryptoApi.h> #include <pthread.h> #include <time.h> #include <unistd.h> #include <fcntl.h> #include <ctype.h> #include<stdbool.h> #include <SecCryptoMgrCommon.h> #include <TestCryptoParse.h> #include <Log.h>

Signs

C
4 years ago
Some of the special symbols that are used in C programming are as follows − [] () {}, ; * = # Let’s understand their definitions, which are as follows − Brackets[] − Opening and closing of brackets are used for array element reference, which

uint

C
4 years ago
uint is a keyword that is used to declare a variable which can store an integral type of value (unsigned integer) from the range of 0 to 4,294,967,295. uint keyword occupies 4 bytes (32 bits) space in the memory C specifies the exact minimum stora

pointer basics

C
4 years ago
#include <stdio.h> #define MAX_LEN 20 int main() { char a[MAX_LEN]="hello"; char *ptr=a; printf("%s",ptr); printf("\nsize of ptr = %ld",sizeof(ptr));//just the size of pointer//this is not value printf("\nsize of *ptr = %ld",siz

string file openclose

C
4 years ago
#include <TestCryptoApi.h> #include <pthread.h> #include <time.h> #include <unistd.h> #include <fcntl.h> #include <ctype.h> #include<stdbool.h> #include <SecCryptoMgrCommon.h> #include <TestCryptoParse.h> #include <Log.h>

file

C
4 years ago
/* this has declarations for fopen(), printf(), etc. */ #include <stdio.h> /* Arbitrary, just to set the size of the buffer (see below). Can be bigger or smaller */ #define BUFSIZE 1000 int main(int argc, char *argv[]) { /* the fir

test arguments

C
4 years ago
------------------------------------------------------------------------------------ #include <stdio.h> int main(int argc, char *argv[]){//(*argv[]==**argv) if(argc!=3){ printf("Error: this program requires exactly two arguments\n");

Reverse array of integers by swapping

C
4 years ago
#include <stdio.h> int main() { int array[10], n=10, c, t, end; //scanf("%d", &n); end = n - 1; for (c = 0; c < n; c++) { scanf("%1d", &array[c]);