answersLogoWhite

0


Best Answer

char x = "C";

if(char == 'C')

{

}

else

{

}

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you apply if in char type in c plus plus?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is a primitive type variable in c plus plus?

same the types used in C. that is int...char...float...


What is explicit typecasting in C plus plus programming?

int i = 42; char c = ( char ) i; // explicit cast double d = i; // implicit cast


What is difference between '1' and 1 as for us a computer is concerned with respect to c plus plus?

When you type '1' in a C++ program, it is considered to be of character data type(char). When you type 1, it is considered to be of integer data type.


What is the significance of c plus plus using ios class?

The ios type is a synonym for the STL class basic_ios, specialised for elements of type char with default character traits. It has the following type definition: typedef basic_ios<char, char_traits<char> > ios; The type is defined in <iosfwd>. It supports the ios class from the old iostream library.


What is the significance of c plus plus by using ios class?

The ios type is a synonym for the STL class basic_ios, specialised for elements of type char with default character traits. It has the following type definition: typedef basic_ios<char, char_traits<char> > ios; The type is defined in <iosfwd>. It supports the ios class from the old iostream library.


Which function reads character into an array specified bt its parameter in c plus plus?

void foo (char& c) { cin >> c; } int main() { char ch[10] {}; for (size_t c=0; c!=10; ++c) foo (c[0]); }


Integers need how many bits to stored in C plus plus?

It depends on the type of integer (such as long, short, int and char) and the specific implementation of C++. The only guarantee is that a char must occupy one byte (sizeof(char)==1). An int is typically 32-bits (4 bytes), but only sizeof(int) can tell you for sure.


What is the c plus plus command to read a line?

You can use cin which located in iostream.h You have to use certain data type to read string, for instance, array of char


What does a char store?

In JavaA char in Java is a 16-bit integer, which maps to a subset of Unicode.In C A char in C is an 8-bit integer, which maps to standard ASCII.Note that in both Java and in C you can use a char value like a normal integer type: char c = 48;


What is available in C language but not in C plus plus?

Not much. Examples, that are possible in C only: char str3[3] = "ABC"; int new;


What is the different type of data type in c classified it?

float,int,char


How do you convert char array into unsigned char array in c?

You can't convert the data type of any variable.