g. surgulaZe, g. janeliZe, i. xuciSvili
g. surgulaZe, g. janeliZe, i. xuciSvili
g. surgulaZe, g. janeliZe, i. xuciSvili
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
}<br />
return 0;<br />
strcmp – ori striqonis Sedareba leqsikografuli mimdevrobiT.<br />
gansazRvra: int strcmp(s1,s2)<br />
char *s1, *s2;<br />
magaliTi 3:<br />
#include <br />
#include <br />
#include <br />
int main(void)<br />
}<br />
{<br />
char *buf1 = "aaa", *buf2 = "bbb", *buf3 = "ccc";<br />
int ptr;<br />
clrscr();<br />
ptr = strcmp(buf2, buf1);<br />
if (ptr > 0)<br />
else<br />
printf("buffer 2 is greater than buffer 1\n");<br />
printf("buffer 2 is less than buffer 1\n");<br />
ptr = strcmp(buf2, buf3);<br />
if (ptr > 0)<br />
else<br />
printf("buffer 2 is greater than buffer 3\n");<br />
printf("buffer 2 is less than buffer 3\n");<br />
getch();<br />
return 0;<br />
strncmp – SevadaroT ori striqonis pirveli n simbolo<br />
gansazRvra: int strncmp(s1,s2, n)<br />
char *s1, *s2;<br />
int n;<br />
magaliTi 4:<br />
103