Tag Archives: inbuilt

Write a program that does not use the inbuilt string function to concatenate two strings 10m Jun2009

Write a program that does not use the inbuilt string function to perform the following: 10m Jun2009 (ii) To concatenate two strings Code:- #include<stdio.h> void main() { void str_concat(char*,char*,char*); char Str1[50],Str2[50],Str3[100]; clrscr(); printf(“\nENTER FIRST STRING TO CONCATE : “); scanf(“%s”,&Str1); printf(“\nENTER SECOND STRING TO CONCATE : “); scanf(“%s”,&Str2); str_concat(Str1,Str2,Str3); printf(“\nSTR1 IS : %s”,Str1); printf(“\nSTR2 IS :… Read More »

Write a program that does not use the inbuilt string functions to perform the following: 10m Jun2006

Write a program that does not use the inbuilt string functions to perform the following: 10m Jun2006 (i) To compare two strings [codesyntax lang=”c”] #include<stdio.h> void main() { int str_cmp(char*,char*); char Str1[50],Str2[50]; int val; clrscr(); printf(“\nENTER FIRST STRING TO COMPARE : “); scanf(“%s”,&Str1); printf(“\nENTER SECOND STRING TO COMPARE : “); scanf(“%s”,&Str2); val=str_cmp(Str1,Str2); if(val==0) printf(“\nSTR1 IS… Read More »

C028 A C program with a function that will return the length of a character string without using inbuilt function

Let’s identify variables needed for this program. In this program, we need several variables to store string and count the number of characters in the given string. First variable will be the one which will save the string entered by the user and it will be S[50]. In C language we do not have string… Read More »

C023 A C program to convert a given lowercase string to uppercase string without using the inbuilt string function

Explanation of FUNCTION: A function is a block of code that has a name and it has a property that it is reusable i.e. it can be executed from as many different points in a C Program as required. Function groups a number of program statements into a unit and gives it a name. This… Read More »