688 views
1 1 vote

Consider the following C program segment:

What will be printed by the program?

Please log in or register to answer this question.

Position:
Show:

Related questions

9 9 votes
6 6 answers
987
987 views
GO Classes asked Jul 25, 2025
987 views
#include <stdio.h void fun() { static int count = 0; count++; printf("%d ", count); } int main() { for (int i = 0; i < 3; i++) fun(); return 0; }What is the output of the...
6 6 votes
3 3 answers
686
686 views
GO Classes asked Jul 25, 2025
686 views
Given the pseudocode below for the function remains(), which of the following statements is true about the output, if we pass it a positive integer $n>2$ ? int remains(in...
7 7 votes
4 4 answers
751
751 views
GO Classes asked Jul 19, 2025
751 views
int arr[ ]={1, 2, 3, 4} int count; incr( ) {return ++count;} main( ) { arr[count++]=incr( ); printf("arr[count]=%d\n", arr[count]); }The value printed by the above progra...
1 1 vote
3 3 answers
418
418 views
rahulraikwar asked Jul 12, 2025
418 views
#include <stdio.h>#include <stdlib.h>#include <string.h>int main() { int a[] = {1,2,3,4,5,6}; printf("%d : %d : %d",*a, (*a)++, (*a)+=2);return 0;}