#include stdio.hint main(){int num = 7, i;unsigned long long fact = 1;if (num 0)printf("Error! Factorial of a negative number doesn't exist.");else{for (i = 1; i = num; i++) {fact *= i;}printf("Factorial of %d = %llu", num, fact);}return 0;}
a = 2What is the output of the following python programb = 3result = (a + b) ** 2print(f"({a} + {b})² = {result}")
#includestdio.hint main() {short i=2300, j=4322;int ans=i+j;printf("i+j=%d",ans);return 0;}
#include stdio.hint main(){int *ptr, a = 10;ptr = &a;*ptr += 1;printf("%d,%d/n", *ptr, a);}
class sookshmas{private:int k;public:sookshmas(){k = 10;}friend void call();};void call(){cout k endl;}int main(){sookshmas s;s.call();return 0;}
def generate_pascal_triangle(num_rows):What is the output of the following programtriangle = []for row in range(num_rows):current_row = []for element in range(row + 1):# If the element is the first or last in the row, set it to 1if element == 0 or element == row:current_row.append(1)else:current_row.append(triangle[row-1][element-1] + triangle[row-1][element])triangle.append(current_row)return triangletriangle = generate_pascal_triangle(5)for row in triangle:print(row)