I am working on a program for encryption & decryption using SDES Algo. This Algo. takes a key of 10-bit length and input plaintext of 8-bits length and produces a ciphertext of 8-bits length. I have collected the key in an array of char (char key[11]) and plaintext as unsigned char (8-bit), then i have converted this plaintext to string (plaintext="11010011").
After this i have defined all the methods used for SDES like EX-OR, Circular sift,
SBOX, etc. all these methods work on string of plaintext.

The problem is that when i remove some printf() from my code, the program just crashes out. I have used lots of printf() to check the current plaintext string.
But if i donot remove the printf()'s it works great.(But takes more time to compelte)

I realy donot understand whats goin on.

Please Help me in some way.
Thankyou..

Put all your printf() back in, take out one at a time and then you'll know exactly where the problem is.