C program to remove first occurrence of a word from string

Write a C program to input any string from user and remove first occurrence of a given word from string. Write a function to remove first occurrence of a word from the string. How to remove first occurrence of a word from the string in C programming. Logic to remove first occurrence of a word from given string.

Example

Input

Input string : Learn programming at Codeforwin.
Input word to remove : Learn

Output

String after removing 'Learn': 
programming at Codeforwin.

Read more

C program to find last occurrence of a character in a string

Write a C program to input any string from user and find the last occurrence of a given character in the string. How to find the last occurrence of a given character in the string. Logic to find last occurrence of a given character in a string in C program.

Example

Input

Input string: I love Codeforwin.
Input character to search: o

Output

Last index of 'o' is 12.

Read more

C program to find the first occurrence of a character in a string

Write a C program to input any string from user and find the first occurrence of a given character in the string. How to find the first occurrence of a given character in a string in C programming. Logic to find first occurrence of a character in a string in C programming.

Example

Input

Input string: I love Codeforwin.
Input character to search: o

Output

'o' is found at index 3

Read more

Queue implementation using linked list, enqueue and dequeue in C

Write a C program to implement queue data structure using linked list. In this post I will explain queue implementation using linked list in C language.

In previous post, I explained about queue implementation using array. Here, I will explain how to implement a basic queue using linked list in C programming. Along with I will explain how to perform enqueue and dequeue operations on Queue in C language.

Read more

Queue implementation using array, enqueue and dequeue in C

Write a C program to implement queue, enqueue and dequeue operations using array. In this post I will explain queue implementation using array in C programming. We will learn how to implement queue data structure using array in C language. And later we will learn to implement basic queue operations enqueue and dequeue.

Read more