Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  Prototipo in C
Language: C/C++
Code:
//Librerie
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define N 100
#define frasi 10

//tipo di dato frase
typedef struct
{
char ITA[N];
char ENG[N];
}frase;

//Sottoprogrammi
void search (frase* V,char* frase);


main()
{
char[N] frase;
frase vocab[frasi]={{"Come stai?","How are you?"},
 {"Da dove vieni","Where are you from"}};

search(vocab,frase);
}

void  search (frase* V,char* frase)
{
int i=0;
while ((strcmp(V[i].ITA,frase)!=1)
  {
   i++;
  }
printf("Traduzione: %s",V[i].ENG);

}



          

          
          
          
          
          
          
          
          
          
          
          
Comments: