cprintingprintfcharacterputchar

How will you print any character, string or value of a variable without library functions in C?


If for example I should not use standard library functions like printf(), putchar() then how can I print a character to the screen?

Is there an easy way of doing it. I dont know much about system calls and if I have to use them then how do I use them? So can any one advice an easy way of printing without using library functions?


Solution

  • Well thank u all for ur answers.I found one simple answer by a comment from Mr. Hao below the question. his answer is simple program like this

    Turbo C(DOS program):

    char far* src = (char far*) 0xB8000000L; 
    *src = 'M'; 
    src += 2; 
    *src = 'D'; 
    

    or try this: http://en.wikipedia.org/wiki/Brainfuck :) – //Hao (an hour ago)

    I tried it on Turbo C and its working. I wanted a simple solution like this and I wanted to accept it as correct answer but he(Hao) gave it as a comment so I pasted it here for other users to know about this on behalf of him and accepted it. Once again thank u Mr.Hao.