2 2 votes What will be the output of following program? #include <stdio.h> void f1(char* str, int index) { *(str + index) &= ~32; } int main() { char arr[] = "gatecsit"; f1(arr, 0); printf("%s", arr); return 0; } What is the output of the above program? Programming in C + – soumayan bandhu 823 views answer comment Share Follow Print See all 6 Comments 6 6 Comments reply Show 3 previous comments soumayan bandhu commented Jan 14, 2018 reply Follow flag ~ this indicates NOT ,but why here &= is used? 0 0 replyShare Shubhanshu commented Jan 14, 2018 reply Follow flag @soumayan bandhu The whole expression is like *(str + index) = *(str + index) & ~32; Which means you have to perform bitwise AND operation onto the two operand which is present in front of you. So, ASCII of g = 103 you can represent that in bit format and then perform 32 complement bitwise AND operation. So, you will get 71 which is ASCII of "G". 0 0 replyShare soumayan bandhu commented Jan 19, 2018 reply Follow flag Here does ~ this symbol means minus? But I know ~A means bitwise NOT operation on A. If A=11001101 ,then ~A=00110010. 0 0 replyShare Please log in or register to add a comment.