summaryrefslogtreecommitdiff
path: root/testapp/c_cpp_files/main_hello_name.c
blob: 71b83a2ba21ed379ccfa01b11ab67d41e4078812 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <stdio.h>
#include <stdlib.h>


void check(char expect[], char result[])
{
    if (expect == result)
    {
	printf("Correct:expected %s got %s \n",expect,result);
    }
    else 
    {
	printf("ERROR:expected %s got %s \n",expect,result);
	exit (0);
   }
}

int main(void)
{
	char result[20];
	char A[20]=" pratham";
	char B[20]=" sir";
 	result[20] = message(A);
        printf("%s",result);
	check("hello pratham", result);
	result[20] = message(B);
	check("hello sir",result);
	printf("All Correct\n");
}