How can you relate the function with the structure? Explain
with an appropriate example.
No Answer is Posted For this Question
Be the First to Post Answer
#include<stdio.h> main() { const int i=4; float j; j = ++i; printf("%d %f", i,++j); }
x=2 y=3 z=2 x++ + y++; printf("%d%d" x,y);
In the following pgm add a stmt in the function fun such that the address of 'a' gets stored in 'j'. main(){ int * j; void fun(int **); fun(&j); } void fun(int **k) { int a =0; /* add a stmt here*/ }
why do you use macros? Explain a situation where you had to incorporate macros in your proc report? use a simple instream data example with code ?
main() { char *p; printf("%d %d ",sizeof(*p),sizeof(p)); }
main() { int i=3; switch(i) { default:printf("zero"); case 1: printf("one"); break; case 2:printf("two"); break; case 3: printf("three"); break; } }
Program to find the largest sum of contiguous integers in the array. O(n)
Given a spherical surface, write bump-mapping procedure to generate the bumpy surface of an orange
There were 10 records stored in “somefile.dat” but the following program printed 11 names. What went wrong? void main() { struct student { char name[30], rollno[6]; }stud; FILE *fp = fopen(“somefile.dat”,”r”); while(!feof(fp)) { fread(&stud, sizeof(stud), 1 , fp); puts(stud.name); } }
#define square(x) x*x main() { int i; i = 64/square(4); printf("%d",i); }
4 Answers Google, HCL, Quick Heal, WTF,
main() { printf("%x",-1<<4); }
Extend the sutherland-hodgman clipping algorithm to clip three-dimensional planes against a regular paralleiepiped