c-language
GATE CSE & IT · Symbol Tables & Storage · 1991-2025
Study anchor
Source-book anchor pending for this concept.
Practice action
Start latest PYQPYQs in this concept
All concepts →Consider the following C program : #include <stdio.h> void stringcopy(char *, char *); int main( ) { char a[30] = "@#Hello world!"; stringcopy(a,a+2); printf("%s\n", a); return 0;...
Consider the following C program: #include <stdio.h> int main() { int a = 6; int b = 0; while(a Which one of the following statements is CORRECT?
The integer value printed by the ANSI-C program given below is ___________. #include<stdio.h> int funcp(){ static int x = 1; x++ ; return x; } int main(){ int x,y; x = funcp(); y =...
Consider the following ANSI C program. #include <stdio.h> int main( ) { int i, j, count; count = 0; i = 0; for (j = -3; j = 0) && (i++)) count = count + j; } count = count + i; pri...
Consider the following C program. #include< stdio.h > struct Ournode{ char x,y,z; }; int main(){ struct Ournode p = {'1', '0', 'a'+2}; struct Ournode *q = &p; printf ("%c, %c", *((...
Consider the following program in C language: #include < stdio.h > main() { int i; int *pi = &i; scanf("%d", pi); printf("%d\n", i + 5); } Which one of the following statements is...
Consider the following recursive C function that takes two arguments: unsigned int foo (unsigned int n, unsigned int r) { if (n > 0) return((n % r) + foo(n/r, r)); else return 0; }...
Consider this C code to swap two integers and these five statements: void swap(int *px, int *py) { *px = *px - *py; *py = *px + *py; *px = *py - *px; } S1: will generate a compilat...
What does the following C statement declare? int (*f)(int *);
Consider the following C program: double foo(double); /* Line 1 */ int main () { double da, db; //input da db = foo(da); } double foo(double a){ return a; } The above code compiled...
Consider the following C function: void swap (int a, int b) { int temp; temp = a; a = b; b = temp; } In order to exchange the values of two variables x and y.
Consider the following declaration of a two-dimensional array in C: char a[100][100]; Assuming that the main memory is byte-addressable and that the array is stored starting from m...
The following C declarations struct node{ int i: float j; }; struct node *s[10]; define s to be
The number of tokens in the following C statement is: printf("i = %d, &i = %x",i, &i);
Indicate the following statement true or false: Although C does not support call by name parameter passing, the effect can be correctly simulated in C.