1 votes 1 votes What will be the value of $x$ and $y$ after execution of the following statement(C language) n = 5; x = n++; y = -x; $5,-4$ $6,-5$ $6,-6$ $5,-5$ Programming in C nielit2016mar-scientistc programming-in-c + – admin asked Apr 2, 2020 • recategorized Oct 28, 2020 by Krithiga2101 admin 1.3k views answer comment Share Follow See 1 comment See all 1 1 comment reply vg653 commented Apr 2, 2020 reply Follow Share D is the correct option. 1 votes 1 votes Please log in or register to add a comment.
1 votes 1 votes Option D: Given n =$5$, $x=n++;$ which is also written as $x =n;$ $n=n+1;$ so, now the x contains the value 5. $y = -x;$ which is nothing but $y =-5$; so the values are x = 5 and y = -5; Saitheja Muthoju answered Apr 26, 2020 Saitheja Muthoju comment Share Follow See all 2 Comments See all 2 2 Comments reply anjli commented Feb 6, 2021 reply Follow Share correct 1 votes 1 votes Padhi98 commented Apr 20, 2021 reply Follow Share yes, correct answer 1 votes 1 votes Please log in or register to add a comment.