C language patterns mostly working