Discoveries IN C

You might also like

You are on page 1of 1

1.

if statement (const/var/expression/func call)


2. printf func returns size of the array printted on the screen
3. while(i+1?--i:--j) the loop will terminate when final output of bracket is 0
4. if(!!7)---two times not operations
5. short type variable is of 2bytes (i.e. 2^16=65536)
6. printf("%x")---hexadecimal to be printed
7. \b is backspace
8. fun(++i,i--)---function operates from right to left. Hence i-- will be executed
first and then ++i
9. c= ++2--- compilation time error, for pre/post increment or pre/post decrement
the operand must be a variable, it can't be an expression also(e.g. (a+b)++ is also
invalid)
10. kbhit() is function in conio header.

sk@9910TCS

fgets(str, 100, stdin); scanf("%s",str);


strlen(str) strlen(str)

Ques: int j=2, p=j;


printf("%d %d %d",p,j==p++,p);

You might also like