Recent questions and answers in Programming and DS

1 votes
0 answers
2
Consider an integer upper triangular 2D array arr[–8 to +7][–8 to +7] having base address 1000. If the size of the integer is 4 bytes, the address of the element pres...
2 votes
2 answers
3
​​Consider the following $\mathrm{C}$ function definition.int f (int x, int y){ for (int i=0 ; i<y ; i++ ) { x= x + x + y; } return x; }Which of the following stateme...
0 votes
1 answer
4
0 votes
2 answers
7
What is the output of the below code?#include <stdio.h void main() { static int var = 5; printf("%d ", var ); if (var) main(); }a. 1 2 3 4 5b. 1c. 5 4 3 2 1d. Error
1 votes
1 answer
8
int bar(int val){int x=0;while(val 0){x=x+bar(val -1);}return val;}Q: For bar(3) this function is supposed to be stuck in an infinite loop but I do not know how please c...
1 votes
2 answers
10
0 votes
1 answer
16
1 votes
0 answers
17
My question is that can we use command line arguments without use of main function's parameters argc and *argv?
48 votes
8 answers
19
0 votes
0 answers
20
I have a question that can we use command line arguments without main function arguments?int main(int argc, char argv){}
0 votes
1 answer
21
2 votes
2 answers
22
let x be an array of integer . which of the following can not be present in the left hand side of an assignment statementa)x b) x+i c) * (x+i) d) &x[i]
1 votes
1 answer
24
1 votes
1 answer
25
Does C support fractional Indices?float x = some fraction;Is float a[x] valid declaration?
0 votes
1 answer
29
Find the error of the following IP addresses. If the IP is valid, check its Class and determine whether the address is Unicast or Multicast.i) 237.15.2.1ii) 256.1.8.9iii)...
2 votes
2 answers
30
1 votes
1 answer
31
#include <stdio.h int main() { int i = -1; int x = (unsigned char)i; printf("%d", x); return 0; }output is 255 , but please explain how
70 votes
13 answers
33
59 votes
4 answers
34
To see more, click for all the questions in this category.