c-program
GATE CSE & IT · Number Theory & Algorithms · 2004-2021
Study anchor
Source-book anchor pending for this concept.
Practice action
Start latest PYQPYQs in this concept
All concepts →Consider the following ANSI C program #include <stdio.h> int foo(int x, int y, int q) { if ((x <= 0 && (y <= 0)) return q; if (x <= 0) return foo(x, y - q, q); if (y <= 0) return f...
The following C program is executed on a Unix/Linux system: #include < unistd.h > int main () { int i ; for (i=0; i<10; i++) if (i%2 == 0) fork ( ) ; return 0 ; } The total number...
Consider the following C-program fragment in which i, j and n are integer variables. for (i = n, j = 0; i > 0; i /= 2, j += i); let val (j) denote the value stored in the variable...
Consider the following C program main ( ) { int x, y, m, n; scanf("%d %d", &x, &y); /* Assume x > 0 and y > 0 */ m=x; n=y; while(m!=n) { if(m>n) m=m-n; else n=n-m; } printf("%d", n...