Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Filter
Profile
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
Questions by rishabhgupta12
0
votes
0
answers
1
NPTEL
/* sizeof(int)=4; sizeof(float)=8; sizeof(unsigned char)=1 ; */ What is the output of the following program ? #include<iostream> #include<stdio.h> using namespace std; int main(){ union Data{ int i; float f; unsigned char str[20]; }data; printf("size =%d\n",sizeof(data)); data.i=10; data.f=220.5; printf("data.i: %d\n",data.i); return 0; }
/* sizeof(int)=4;sizeof(float)=8;sizeof(unsigned char)=1 ; */What is the output of the following program ?#include<iostream>#include<stdio.h>using namespace std;int m...
729
views
asked
Sep 10, 2018
Programming in C
nptel-quiz
+
–
0
votes
0
answers
2
Linked list
Function to reverse the circular doubly linked list. Why is this function showing an error? head is a global variable. void reverse() { struct node *z; struct node *t = head -> forw; while(t != head) { z=t->back; t->back=t->forw; t->forw=z; t = t -> back; } z=t->back; t->back=t->forw; t->forw=z; head=t->forw; }
Function to reverse the circular doubly linked list.Why is this function showing an error?head is a global variable.void reverse() { struct node *z; struct node *t = h...
819
views
asked
Aug 6, 2018
Programming in C
linked-list
data-structures
+
–
2
votes
2
answers
3
Linked list
How to trace the below program? p and q are the starting address of two different linked list struct node*Do(struct node*p,struct node*q){ struct node*ps,*qs; if(!p){ return(q); } else if(!q){ return(p); } else{ ps=p->link; qs=q->link; p->link=q; q->link=Do(ps,qs); return(p); } }
How to trace the below program?p and q are the starting address of two different linked list struct node*Do(struct node*p,struct node*q){ struct node*ps,*qs; if(!p...
913
views
asked
Aug 3, 2018
Programming in C
linked-list
recursion
+
–
0
votes
3
answers
4
C programming
How many times will the loop execute? What is the general expression in terms of 'n'? for( i=1; i<=n; i=i*3) { for( j=i; j<=n; j++) { printf ( "ravi"); } }
How many times will the loop execute?What is the general expression in terms of 'n'?for( i=1; i<=n; i=i*3) { for( j=i; j<=n; j++) { printf ...
546
views
asked
Jul 19, 2018
Programming in C
programming-in-c
+
–
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register