The problem is with lvalue (left hand side of assignment). For each assignment there should be a valid address to store the value assigned through right side of the assignment operator. Here left side trying to access address 0 which is not allowed that's is the reason it is getting crashed.
For given list of numbers find out triplets with sum 0 using C? Input : arr[] = {0, -1, 2, -3, 1} Output : 0 -1 1 2 -3 1
Array consist of -1 and 1, Find count of all sub-arrays where sum = 0. Input: [-1,1,-1,1]
Output: 4 [-1,1] [1,-1],[-1,1],[-1,1,-1,1]
What type of conversion is not accepted in C and why? a) char to int b) float to char pointer c) int to char d) double to char
struct marks { int a:1; int b:2; }; int main() { struct marks obj={1,6}; printf("%d %d\n",obj.b,obj.a); }