#define DCHAR char*
typedef char* TCHAR;
if using these following variables will be declared like
DCHAR ch1, ch2;
TCHAR ch3, ch4;
then what will be types of ch1, ch2, ch3 and ch4?
Answer Posted / james holdcroft
Explanation:
DCHAR is a macro, which is expanded by the preprocessor.
TCHAR is a synonym for a pointer-to-char type.
After preprocessing, the code fragment expands to:
char* ch1, ch2;
TCHAR ch3, ch4;
which is perhaps more clearly written as:
char *ch1, ch2;
TCHAR ch3, ch4;
which is equivalent to:
char *ch1; char ch2;
char *ch3; char *ch4;
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
Explain what are its uses in c programming?
How does placing some code lines between the comment symbol help in debugging the code?
What is the difference between ++a and a++?
a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none
Explain what is the benefit of using const for declaring constants?
What is array in C
the factorial of non-negative integer n is written n! and is defined as follows: n!=n*(n-1)*(n-2)........1(for values of n greater than or equal to 1 and n!=1(for n=0) Perform the following 1.write a c program that reads a non-negative integer and computes and prints its factorial. 2. write a C program that estimates the value of the mathematical constant e by using the formula: e=1+1/!+1/2!+1/3!+.... 3. write a c program the computes the value ex by using the formula ex=1+x/1!+xsquare/2!+xcube/3!+....
What do mean by network ?
What is the right type to use for boolean values in c? Is there a standard type?
What are data structures in c and how to use them?
What is sizeof int in c?
Describe the order of precedence with regards to operators in C.
write a program to create a sparse matrix using dynamic memory allocation.
what is the structure pointer?
Why do we need arrays in c?