answersLogoWhite

0

#include <stdio.h>

int main (void)

{

char *first= "Hello";

int second = 12;

printf ("first=%s, second=%d\n", first, second);

return 0;

}

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

How do you write a program in C plus plus plus plus How do you write a program in C to swap two variables without using the third oneo swap two variables without using the third one?

To swap two variables without using a third variable, use exclusive or manipulation... a ^= b; b ^= a; a ^= b;


What is the Algorithm for exchanging values of two variables?

There are three primary algorithms to exchange the values of two variables. Exchange with Temporary Variable temp = a; a = b; b = temp; Exchange Without Temporary Variable Using Exclusive Or a = a ^ b; b = b ^ a; a = a ^ b; Exchange Without Temporary Variable Using Arithmetic a = a + b; b = b - a; a = a - b;


How do you write a program in Perl to swap two variables without using the third one?

Use list assignment i.e. for two variables $a, $b: ($a,$b) = ($b,$a)


Can you write addition of 2 no program without using third variable?

Yes. int a, b; a= 2; b= 3; a= a+b;


How do you write BASIC program to accept variables?

dim a input a


How do you write a program in C to swap two variables without using the third one using XOR?

a=a^b; b=a^b; a=a^b;


How do you write xy in c program?

Assuming that x and y are two variables, such as they might be in Algebra, and that the expression "xy" is meant to be the multiplication of x times y, you would write it as x * y This expression could be used with a third variable in an assignment statement, or as a condition in an if statement where it can be compared to another variable or a constant.


What variable precedes the other when thinking of independent and dependent variables?

The independent variable is named first. In the Cartesian plane, this means you write (X, Y).


Write a programme to exchange the content of 2 variables using another variable?

t=x; /* t is the other variable */x=y;y=t;


Why does programmer need variable?

Variables can maintain the same value throughout a program, or they can change values several times, depending on your needs. when you put a variable in a program, the computer recognises the variable and you can change it's value throughout without an error. Note: You can write programs without variables, but their functionality will be quite restricted, like this: int main (void) { puts ("hello, world"); return 0; }


Can you write a program without main in c?

Certainly, you can write a program without main, but you cannot build an executable from it, if that is okay with you.


How do we write c program without using swap to interchange values by accessing another variable?

int a,b; a=a+b; b=a-b; a=a-b; that's it simple