Skip to content

Tag Archives: C Conversion Programs

C Conversion Programs

Converting string to int is a reoccurring task in the programming world. Despite being a simple task, many coders either fail or get confused while… Read More
To convert String to size_t  in C++ we will use stringstream, It associates a string object with a stream allowing you to read from the… Read More
A hexadecimal number is a number whose base is 16. has numerals 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,… Read More
Prerequisite: C++ Program For char to int Conversion  Vector in C++ Conversion of string to integer is one of the common tasks done in C++,… Read More
Given a binary number as input, we need to write a program to convert the given binary number into an equivalent decimal number. Examples:  Input:… Read More
Given a decimal number as input, we need to write a program to convert the given decimal number into an equivalent octal number. i.e convert… Read More
There are three ways to convert char* into string in C++. Using the “=” operator Using the string constructor Using the assign function 1. Using… Read More
To convert boolean to string in C we will use the following 2 approaches: Using Conditional Statements Using Ternary Operator Input:  bool n = true… Read More
To convert the int to char in C language, we will use the following 2 approaches: Using typecasting Using sprintf() Example: Input: N = 65… Read More
To convert double to string in C language, we will use the sprintf function as follows: Input:  n = 456321.7651234 Output:  string: 456321.7651234 Method: Using… Read More
Here we will build a C program for hexadecimal to decimal conversion using 5 different approaches i.e. Using format Specifier Using Switch case Using array … Read More
There are 3 ways to convert the char to int in C language as follows: Using Typecasting Using sscanf() Using atoi() Let’s discuss each of… Read More
 Here we will build a C Program For Decimal to Hexadecimal Conversion using 4 different approaches i.e. Using format specifier Using modulus division operator Without… Read More
Here we will build a program to showcase an efficient way to convert a char from upper to lower and vice versa in C in… Read More
To convert the long to string in C language we will use the following 2 approaches: Using Macros with sprintf Using sprintf Input:  long =… Read More

Start Your Coding Journey Now!