Exemple #1
0
/**
 * 7.3 minprintf
 */
int main(int argc, char *argv[])
{
	
	minprintf("%dhoge\n",1);	
	minprintf("%shoge\n","moge");	
	return 0;
}
Exemple #2
0
main()
{
	printf("printf:    %% %d %f %s\n", 20, 55.34, "jaseem");
	minprintf("minprintf: %% %d %f %s\n", 20, 55.34, "jaseem");
	printf("printf:    %% %10d %3f %7s %p\n", 20, 55.34, "jaseem", NULL);
	minprintf("minprintf: %% %10d %3f %7s %p\n", 20, 55.34, "jaseem", NULL);
	return 0;
}
main()
{
	void minprintf(char *, ...);
	int max = 10;
	char *s = "hello, world";


	minprintf("50%% are wrong: %d %f %s %f %d\n",
		123, 456.78, "hello, world", 1e5, 99);
	minprintf("%d/%d = %f (%s)\n",
		355, 113, (double) 355/113, "approximately");
#include "printfstar.c"
	putchar('\n');
	return 0;
}
Exemple #4
0
int main(void)
{
	void minprintf(char *fmt, ...);
	
	minprintf("Today is %d %d %f %s %%.\n", 2014, 07, 11.0, "Friday");

	return 0;

}
Exemple #5
0
int main(int argc, char **argv)
{
	int i = 42;
	double d = 3.98;
	char *s = "hello world";
	char c = 'a';
	void *p = (void *)&i;
	minprintf("double: %f\nstring: %s\nchar: %c\naddr: %p\nint: %d\n", d, s, (int)c, p, i);
	return 0;
}
Exemple #6
0
int main(void)
{
   int ret = 0;


   char str[] = "decimal = %d\ndecimal = %i\noctal = %o\nhex = %x\nhex = %X\nunsigned = %u \nunsigned = %u \nchar = %c \nfloat = %f \nstring = %s \ndouble = %e \ndouble = %E \ndouble = %g \n%%%% = %% \n";


   minprintf(str, 10, 34, 8, 16, 255, -1, 1, 'a', 12.54, "hello world", 32.54, 0.21, 0.00000000054);

   return ret;
}
Exemple #7
0
int main(void) {

    minprintf("test of no format\n");
    minprintf("test of integer format ('%%d'): %d\n", 10);
    minprintf("test of double  format ('%%f'): %f\n", 3.14);
    minprintf("test of string  format ('%%s'): \"%s\"\n", "this is a string");
    minprintf("test of hex     format ('%%x'): %x\n", 65534);
    minprintf("test of complex format ('[%%-15.10s]'): [%-15.10s]\n", "hello world!");
    minprintf("test of multiple args: %d, %f, \"%s\"\n", 10, 3.14, "this is a string");

    return 0;
}
Exemple #8
0
int main(int argc, char **argv){
	minprintf("%-f\n", 100.123);
	minprintf("%s\n", "hello, world");
	minprintf("%15.4f\n", 123.456789);
}
Exemple #9
0
int main(){
	minprintf("hello my name is %s. \nAge %d, class %f.", "Puru", 22, 5.00);
	return 0;
}
Exemple #10
0
int main()
{
    minprintf("%d\n", 12);
    return 0;
}
Exemple #11
0
int main()
{
  minprintf("D:%d F:%f S:%s\n", 123, 123.456, "abcd");
  return 0;
}
Exemple #12
0
int main(int argc, char** argv) {

    minprintf("%d %f",1,2.0);
}
Exemple #13
0
int main()
{
    minprintf("test %d %f %s.\n", 0, 0.34, "ahahahahah");
    return 0;
}
Exemple #14
0
sevenPointThree() {
	void minprintf(char *fmt, ...);
	minprintf("%s\n", "jiaweinumberone");
}
Exemple #15
0
int main() {
	minprintf("%d %s %f\n", 12, "spdertianye", 12.5);
	return 1;
}
Exemple #16
0
int main(void)
{
	minprintf("%d, %s, %2x\n", 12, "t_base_define", 15);
	return 0;
}
int main(int argc, char *argv[])
{
    minprintf("%s\n", "hello");
    return 0;
}
Exemple #18
0
int main(){
  minprintf("%d %f %s\n", 10, 100.2, "Keep going!!");
  return 0;
}