Skip to main content

Posts

Showing posts from May, 2023

Write a program to check the string is palindrome or not ?

 

A character array has a string called "He is a good boy" Replace this 'good' into 'bad'.

 

Write a program to insert n element in the array and search for the element s in that array . If element found, replace that element with 100

#include <stdio.h> int main () {     int a[ 5 ];     int i,ins,ser,pos,r;     for (i = 0 ;i < 5 ;i ++ )     {         printf ( "Enter %d element:" ,i + 1 );         scanf ( " %d " , & a[i]);     }     printf ( " \n Enter an element to insert:" );     scanf ( " %d " , & ins);     printf ( " \n Enter the position where you want to insert the element:" );     scanf ( " %d " , & pos);     for (i = 5 ;i >= pos;i -- )     a[i] = a[i - 1 ];     a[pos - 1 ] = ins;     for (i = 0 ;i <= 5 ;i ++ )     {         printf ( " %d\t " ,a[i]);     }     int count = 0 ;     printf ( " \n Enter element to search:" );     scanf ( " %d " , & ser);     for (i = 0 ;i <= 5 ;i ++ )     {         if ...

How to convert a string to lowercase in C

 

How to convert a string to uppercase in C?

 

How to reverse a string in C?

 

How to copy one string to another string in C?

 

How to find the length of a string in C?

 

How to compare two strings in C?

 

How to concatenate two strings in C?

 

How to output a string in C ?

 

How to input a string from the user in C?

 

How to declare and initialize a string in C?

 

Write a program to find the reverse of a number using function in C.

 

Write a program that uses a while loop to compute and prints the sum of given numbers of cubes. For example, if 3 is input, then the program should print 36, which is equal to 1^3+2^3+3^3

 

C Language Model Question solution of 2022 with programs .

                                                                    Group "A'"                                                                    Q. No 1 .Define loop. Loop is   used to execute the block of code several times according to the condition given in the loop . It means it executes the same code multiple times so it saves code and also helps to traverse the elements of an array. Q. No. 2.Write the rules of naming identifier. Rules Identifier names are unique. Cannot use a keyword as identifiers. Identifier has to begin with a letter or underscore (_). It should not contain white space. Q. No. 3.Write the use of fseek()function with it's ...

Write a program to demonstrates the concept of pointer arithmetic in c.

 

Write a program to find sum of digit using for loop in c.

 

Write a c program to print lower triangular matrix in c.

 

Write a c program to illustrates the concept of structure in c.

 

Write a c program to traverse the array elements of 2D array.

 

implement a C program to find the distance between two points