0% found this document useful (0 votes)
63 views2 pages

Chandan

This C program concatenates two character string variables together using the strcat function. It first prints the individual strings "welcome" and "hello", then concatenates "hello" to the end of "welcome" with a space between them, and prints the concatenated string. It uses header files for input/output functions and clears the screen before displaying output.

Uploaded by

Sanjiv Gautam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views2 pages

Chandan

This C program concatenates two character string variables together using the strcat function. It first prints the individual strings "welcome" and "hello", then concatenates "hello" to the end of "welcome" with a space between them, and prints the concatenated string. It uses header files for input/output functions and clears the screen before displaying output.

Uploaded by

Sanjiv Gautam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

#include<stdio.

h>

#include<conio.h>

#include<string.h>

int main()

char s1[15]="welcome";

char s2[10]="hello";

clrscr();

puts(s1);

puts(s2);

strcat(s1," ");

strcat(s1,s2);

puts(s2);

getch();

return 0;

Output
#include<stdio.h>

int main()

int n;

printf("Enter an integer\n");

scanf("%d",&n);

if(n%2==0)

printf("Even\n");

else

printf("Odd\n");

return 0;

Output

You might also like