Thread: Qui peut me faire , C'est une exercice en programation C

  1. #1
    Registered User
    Join Date
    Sep 2021
    Posts
    1

    Question Qui peut me faire , C'est une exercice en programation C

    (b) Ecrire une fonction qui permet de comparer deux caractères d’une même chaine; c’est-à-dire le i-ème et le j-ème caractère d’une chaine passée en paramètre. La fonction va retourner 1 (un) si les caractères sont égaux et 0 (zéro) sinon. Cette fonction aura pour signature: int cmpCaractere(char chaine[], int i, int j). (c)Un palindrome est un mot qui peut se lire de droite à gauche ou de gauche à droite. Par exemple les mots "matam", "elle" et "kayak" sont des palindromes. En utilisant une boucle et en se référant à la fonction définie en (b), écrire la fonction qui a pour signature int palindrome (char chaine[])pour vérifier si une chaine est un palindrome. La fonction va retourner 1 (un) si la chaine est un palindrome et 0 (zéro) sinon.(2 pts) NB: une chaine de caractères se termine par le caractère‘\0’.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Google translate says
    Who can do me, It's an exercise in C programming

    (b) Write a function that allows you to compare two characters of the same string; That is, the i-th and the j-th character of a string passed as a parameter. The function will return 1 (one) if the characters are equal and 0 (zero) otherwise. This function will have for signature: int cmpCaractere (char string [], int i, int j). (c) A palindrome is a word that can be read right to left or left to right. For example the words "matam", "elle" and "kayak" are palindromes. Using a loop and referring to the function defined in (b), write the function that is signed by int palindrome (char string []) to check if a string is a palindrome. The function will return 1 (one) if the string is a palindrome and 0 (zero) otherwise. (2 pts) NB: a character string ends with the character ‘\ 0’.
    1. This is an English speaking forum.
    2. You need to at least make some effort to solve the problem (more than just copy/pasting from your assignment).
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. exercice help
    By medyas in forum C Programming
    Replies: 2
    Last Post: 12-07-2014, 07:19 AM
  2. Exercice - Calculate the fee
    By khelkely in forum C++ Programming
    Replies: 9
    Last Post: 10-20-2013, 06:04 AM
  3. need Exercice on Functions in C
    By Dr.Vip in forum C Programming
    Replies: 8
    Last Post: 01-03-2012, 04:37 AM
  4. need help for a programming exercice
    By thibault0613 in forum C# Programming
    Replies: 4
    Last Post: 11-12-2011, 07:38 PM
  5. help for my programming exercice
    By thibault0613 in forum C# Programming
    Replies: 5
    Last Post: 11-09-2011, 01:52 PM