Hướng dẫn remove duplicate words from string in c++ - xóa các từ trùng lặp khỏi chuỗi trong C++

Chương trình C này xóa tất cả các từ được lặp lại trong chuỗi.

Dưới đây là mã nguồn của chương trình C để xóa tất cả các từ được lặp lại trong chuỗi. Chương trình C được biên dịch thành công và chạy trên một hệ thống Linux. Đầu ra chương trình cũng được hiển thị dưới đây.

  1. /*
  2.  * C Program to Delete All Repeated Words in String
  3.  */
  4. #include <stdio.h>
  5. #include <stdlib.h>
  6. #include <string.h>
  7.  
  8. int main ()
  9. {
  10. char str[100], word[100], twoD[10][30];
  11.  * C Program to Delete All Repeated Words in String0
  12.  
  13.  * C Program to Delete All Repeated Words in String2
  14.  * C Program to Delete All Repeated Words in String3
  15.  
  16.  * C Program to Delete All Repeated Words in String5
  17.  * C Program to Delete All Repeated Words in String6
  18.  * C Program to Delete All Repeated Words in String7
  19.  * C Program to Delete All Repeated Words in String8
  20.  * C Program to Delete All Repeated Words in String9
  21.  */0
  22.  */1
  23.  */2
  24.  */3
  25.  */4
  26.  * C Program to Delete All Repeated Words in String9
  27.  */6
  28.  */7
  29.  */3
  30.  */9
  31.  
  32. #include <stdio.h>1
  33.  
  34. #include <stdio.h>3
  35. #include <stdio.h>4
  36.  * C Program to Delete All Repeated Words in String7
  37. #include <stdio.h>6
  38. #include <stdio.h>7
  39.  * C Program to Delete All Repeated Words in String9
  40. #include <stdio.h>9
  41. #include <stdlib.h>0
  42. #include <stdlib.h>1
  43. #include <stdlib.h>2
  44.  
  45. #include <stdlib.h>4
  46. #include <stdlib.h>5
  47. #include <stdlib.h>6
  48. #include <stdlib.h>2
  49.  */3
  50. #include <stdlib.h>9
  51. #include <string.h>0
  52. #include <string.h>1
  53. #include <string.h>2
  54.  */9
  55.  
  56. #include <stdio.h>3
  57.  
  58. #include <string.h>7
  59.  * C Program to Delete All Repeated Words in String7
  60. #include <string.h>9
  61.  0
  62.  */4
  63.  2
  64.  */9
  65.  
  66.  5
  67.  
  68.  7
  69.  8

 9

Sê -ri Giáo dục & Học tập toàn cầu Sanfoundry - 1000 chương trình C.

Tại đây, danh sách các cuốn sách hay nhất trong lập trình C, cấu trúc dữ liệu và thuật toán

Bước tiếp theo:

  • Nhận Giấy chứng nhận miễn phí trong chương trình C
  • Tham gia cuộc thi chứng nhận lập trình C
  • Trở thành người xếp hạng hàng đầu trong chương trình C
  • Thực hiện các bài kiểm tra lập trình C
  • Các bài kiểm tra thực hành theo chương: Chương 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10
  • Các bài kiểm tra giả chương: Chương 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10,

Manish Bhojasia, một cựu chiến binh công nghệ với hơn 20 năm @ Cisco & Wipro, là người sáng lập và CTO tại Sanfoundry. Ông sống ở Bangalore, và tập trung vào sự phát triển của nhân Linux, Công nghệ San, Cvanced C, Cấu trúc dữ liệu & Alogrithms. Giữ kết nối với anh ta tại LinkedIn.Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Đăng ký các lớp học chính miễn phí của mình tại YouTube & Thảo luận kỹ thuật tại Telegram SanfoundryClasses.

Chủ đề