//can't print with printf, since string is a C++ class obj and print %s
//doesn't recognize
//can do
printf("%s", str.c_str()) //converts string to c str (char array)
//or just use cout<<str;
//string assignment
str1=str2; //or
str1.assign(str2)
#include <cstdio>
int main(){
char c = 'S';
float x = 7.0, y = 9.0;
double d = 6.548;
int i = 50;
printf("The float division is : %.3f / %.3f = %.3f
", x,y,x/y);
printf("The double value is : %.4f
", d);
printf("Setting the width of c : %*c
",3,c);
printf("The octal equivalent of %d is %o
",i,i);
printf("The hex equivalent of %d is %x
",i,i);
return 0;
}