Recent questions tagged programming-in-c

0 votes
2 answers
1741
void main() { typedef struct a aType; aType someVariable; struct a { int x; aType *b; }; }
0 votes
1 answer
1742
void main() { int i=10, j=2; int *ip= &i, *jp = &j; int k = *ip/*jp; printf(“%d”,k); }
0 votes
1 answer
1743
0 votes
1 answer
1744
K is int typeK=2.0/9;What k will print? In let us c they give that k final value is 0.0But I think it's value is 0
0 votes
2 answers
1745
0 votes
1 answer
1746
main() { int i=3; switch(i) { default:printf("zero"); case 1: printf("one"); break; case 2:printf("two"); break; case 3: printf("three"); break; } }
1 votes
2 answers
1747
Assume that the size of an integer is 4 bytes. Predict the output?#include <stdio.h int fun() { puts(" Hello "); return 10; } int main() { printf("%d", sizeof(fun())); re...
0 votes
1 answer
1749
1 votes
1 answer
1750
char *(*(* a[N])())();Can somebody explain this for me? How to read this?
0 votes
1 answer
1755
#include<stdio.h int main() { char arr[10]; memset(arr,0,sizeof(arr)); gets(arr); printf("\n The buffer entered is [%s]\n",arr); return 0; }
0 votes
2 answers
1756
void f(int n){ if(n <= 1){ printf("%d", n); } else{ f(n/2); printf("%d", n%2); } }
0 votes
1 answer
1757
The valid pointer operation is assigning or comparing to zero in CCan anyone explain this statement?
4 votes
2 answers
1758
0 votes
2 answers
1759
#include<stdio.h int main() { printf("%c\n", 7["IndiaBIX"]); return 0; } Please explain how the output is X ? I know while counting in Array will make X . But how this CO...
0 votes
1 answer
1760
Why C language does not provide heap or garbage collection ?? Is there any higher level mechanism??
0 votes
3 answers
1761
int main(){ int a; a = 1; while(a >= 1) while(a >= 0); printf("%d", a); }
0 votes
1 answer
1762
What is the difference between struct node* head= NULL and struct node* head= (struct node*)NULL ?
1 votes
3 answers
1763
What is the difference when I write in program mynode * head; add_node(&head,10); add_node( struct node head, into value);To this mynode *head; add_node (head,10); add_...
1 votes
1 answer
1764
void fun(int *p) { int q = 10; p = &q; } int main() { int r = 20; int *p = &r; fun(p); printf("%d", *p); return 0; }
1 votes
1 answer
1765
#include<stdio.h>int main(){char *s = "Geeks Quiz";int n = 7;printf("%.*s", n, s);return 0;}
0 votes
1 answer
1766
when constant type variables cannot be modified then why do we consider them as lvalues , why not only r-values ?