Recent questions in Programming and DS

2 votes
1 answer
3381
2 votes
2 answers
3382
What is the output of this program?#include <stdio.h int main() { char *ptr; char string[] = "How are you?"; ptr = string; ptr += 4; printf("%s",ptr); return 0; }How are ...
0 votes
1 answer
3383
The value of p after execution of the following program will be:int new(int t) { static int cal=0; cal=cal+t; return(cal); } main() { int t,p; for(t=0;t<=4;t++) p= new(t)...
0 votes
0 answers
3384
0 votes
1 answer
3386
What is the output of this program?#include <stdio.h #include <string.h int main() { char string[] = "Hello"; printf("%lu %lu", sizeof(string), strlen(string)); return 0;...
4 votes
2 answers
3387
1 votes
1 answer
3389
0 votes
1 answer
3390
I have read that in Linux, user can do CTRL+D and it's leads to equivalent, but I have an question that user has to press CTRL+D or write CTRL+D in program like a charact...
3 votes
1 answer
3397
Consider the below $C$ code:#include<stdio.h int main() { char a[] = "gateoverflow"; char *p = a; printf("%s", p+p[3]-p ); }The output will be : gate eoverflow overflo...
0 votes
1 answer
3399
why getch( ), putch( ),getchar()Putchar( ) etc function in c exist when we have printf and scanf functions ?What is importance of these functions??
0 votes
1 answer
3400