[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-391265-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-391265-en":130},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","hcl-placement-papers-section-ii-c-programming-c-questions","HCL Placement Papers - Section II-C Programming - C Questions","","HCL placement question paper section II-C focuses on programming fundamentals and C language concepts. It includes multiple-choice problems on pointer declarations, macro evaluation, memory allocation and freeing, type casting, switch control expression rules, arrays passed to functions, operator precedence and conditional expressions, enumerations, string handling and strcpy implementation, and execution flow in fall-through switch blocks. Additional questions cover swap-by-value behavior, macro side effects, self-referential structs, union sizing, formatted string output, and data sufficiency scenarios involving numeric reasoning and savings.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/exam/","Exam",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/hcl-placement-papers-section-ii-c-programming-c-questions/391265/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/hcl-placement-papers-section-ii-c-programming-c-questions/391265.png","ImageObject",300,407,{"name":42,"@type":43},"Ben ","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-09","2026-09-25",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",9,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"What topic does Section II-C focus on in this placement paper?","Question",{"text":63,"@type":64},"It focuses on C programming concepts and related reasoning through multiple-choice questions, including pointers, macros, control flow, and basic data structures.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"Which question types are included beyond pure C syntax?",{"text":68,"@type":64},"Besides code behavior questions, it includes operator/expression evaluation and data sufficiency problems that require determining whether given statements are enough to reach an answer.",{"name":70,"@type":61,"acceptedAnswer":71},"How do the questions typically test C understanding?",{"text":72,"@type":64},"They test correctness of declarations, output of small programs, effects of casts and pointer arithmetic, and language rules such as switch controlling expression types and struct self-reference.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},391265,1790367127,{"code":4,"msg":82,"data":83},"success",[84,88,92,95,100,105,110,115,119,122,126],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":93,"slug":94},70,"exam",{"id":96,"doc_module":4,"doc_module_name":25,"category_name":97,"show_sort_weight":98,"slug":99},5,"Comic",60,"comic",{"id":101,"doc_module":4,"doc_module_name":25,"category_name":102,"show_sort_weight":103,"slug":104},6,"Technology",50,"technology",{"id":106,"doc_module":4,"doc_module_name":25,"category_name":107,"show_sort_weight":108,"slug":109},7,"Healthcare",40,"healthcare",{"id":111,"doc_module":4,"doc_module_name":25,"category_name":112,"show_sort_weight":113,"slug":114},8,"Research & Report",30,"research-report",{"id":55,"doc_module":4,"doc_module_name":25,"category_name":116,"show_sort_weight":117,"slug":118},"Religion & Spirituality",20,"religion-spirituality",{"id":117,"doc_module":4,"doc_module_name":25,"category_name":120,"show_sort_weight":117,"slug":121},"World Cup","world-cup",{"id":123,"doc_module":4,"doc_module_name":25,"category_name":124,"show_sort_weight":123,"slug":125},10,"Lifestyle","lifestyle",{"id":127,"doc_module":4,"doc_module_name":25,"category_name":128,"show_sort_weight":96,"slug":129},19,"General","general",{"code":4,"msg":82,"data":131},{"doc_id":79,"user_id":132,"nickname":42,"user_avatar":133,"doc_module":4,"category_id":33,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":139,"language":140,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":12,"update_tm":144,"read_time":145,"preview_page_count":4},2336478951081,"https://ap-avatar.wpscdn.com/davatar_276721f389ce27ea32af1340a28f341c","HCL Placement Papers  \nHCL-TECH(it-bhu)2K3  \nOrdering is changed this time.So don't byheart by a,b,c,d. Byheart the  \nanswers. Pls check answer once again  \nDon't hesitate to answer all. Ever HR knows that Students have  \nthis qp.  \nIst section of the Question is as such in the [placement papers.com](placement papers.com)  \n[Section II-C Programming](Section II-C Programming)  \n1. Which of the following about the following two declaration is true  \ni ) int *F()  \nii) int (*F)()  \nChoice :  \na) Both are identical  \nb) The first is a correct declaration and the second is wrong  \nc) The first declaraion is a function returning a pointer to an  \ninteger and the second is a pointer to function returning int  \nd) Both are different ways of declarin pointer to a function  \nAnswer : c) The first de...  \n2. What are the values printed by the following program?  \n\\#define dprint(expr) printf(\\#expr \"=%d\\n\",expr)  \nmain(){ int x=7;  \nint y=3;  \ndprintf(x/y);}  \nChoice:  \na) \\#2 = 2 b) expr=2 c) x/y=2 d) none Answer: c)x/y=2  \n3. Which of the following is true of the following program  \nmain(){  \nchar *c;  \nint *ip;  \nc =(char *)malloc(100);  \nip=(int *)c;  \nfree(ip);}  \nans: The code functions properly releasing all the memory allocated  \n4.output of the following.  \nmain(){ int i;  \nchar *p;  \ni=0X89;  \np=(char *)i;  \np++;  \nprintf(\"%x\\n\",p);}  \nans:0X8A  \n5.  \nwhich of the following is not a ANSI C language keyword?  \nans:Function.  \n6. When an array is passed as parameter to a function,  \nwhich of  \nthe following statement is correct  \nchoice:  \na) The function can change values in the original array  \nb) In C parameters are passed by value. The funciton cannot change  \nthe original value in the array  \nc) It results in compilation error when the function tries to access the elements in the array  \nd) Results in a run time error when the funtion tries to access the elements in the array  \nAnswer: a) The fu...  \n7. The type of the controlling expression of a switch statement cannot be of the type  \na) int b) char c) short d)float e) none Answer : d)float  \n8.What is the value of the expression (3^6) + (a^a)? a) 3 b) 5 c) 6 d) a+18 e) None  \nAnswer : 5  \n9. What is the value assigned to the variable X ifbis 7 ?  \nX = b>8 ? b \u003C\u003C3 : b>4 ? b>>1:b;  \na) 7 b) 28 c) 3 d) 14 e) None ans: 3;  \n10. Which is the output produced by the following program  \nmain(){ int n=2;  \nprintf(\"%d %d\\n\", ++n, n*n);}  \na) 3,6 b) 3,4 c) 2,4 d) cannot determine  \nAnswer : b) 3,4  \n11. What is th output of the following program? int x= 0x65;  \nmain(){ char x;  \nprintf(\"%d\\n\",x)}  \na) compilation error b) 'A' c) 65 d) unidentified ans. d)  \n12. What is the output of the following program  \nmain(){ int a=10;  \nint b=6;  \nif(a=3)  \nb++;  \nprintf(\"%d %d\\n\",a,b++);}  \na) 10,6 b)10,7 c) 3,6 d) 3,7 e) none  \nAnswer : d) 3,7  \n13. What can be said of the following program? main()  \n{  \nenum Months {JAN =1,FEB,MAR,APR}; Months X = JAN;  \nif(X==1){  \nprintf(\"Jan is the first month\");}  \n}  \na) Does not print anything  \nb) Prints : Jan is the first month  \nc) Generates compilation error  \nd) Results in runtime error  \nAnswer: b) Prints : Jan..  \n14. What is the output of the following program? main()  \n{  \nchar *src = \"Hello World\";  \nchar dst[100];  \nstrcpy(dst,src); printf(\"%s\",dst);}  \nstrcpy(char *dst,char *src){  \nwhile(*src) *dst++ = *src++;}  \na) \"Hello World\" b)\"Hello\" c)\"World\" d) NULL e) unidentified  \nAnswer: d) NULL  \n15. What is the output of the following program?  \nmain(){ int l=6;  \nswitch(l)  \n{ default : l+=2;  \ncase 4: l=4;  \ncase 5: l++;  \nbreak;}  \nprintf(\"%d\",l);}  \na)8 b)6 c)5 d)4 e)none  \nAnswer : c)5  \n16. What is the output of the following program?  \nmain(){ int x=20;  \nint y=10;  \nswap(x,y);  \nprintf(\"%d %d\",y,x+2);}  \nswap(int x,int y){  \nint temp;  \ntemp =x;  \nx=y;  \ny=temp;}  \na)10,20 b) 20,12 c) 22,10 d)10,22  \ne)none Answer:d)10,22  \n17. What is the output of the following problem ?  \n\\#define INC(X) X++  \nmain(){ int X=4;  \nprintf(\"%d\",INC(X","cbCaisCPdYoX5OPu","https://ap.wps.com/l/cbCaisCPdYoX5OPu","pdf",173819,29,"English","# Section II-C Programming\n## Pointer and declaration questions\n## Macros, expressions, and operators\n## Switch, enums, and function behavior\n## Strings, structs, unions, and output formatting\n## Data sufficiency reasoning","[{\"question\":\"What topic does Section II-C focus on in this placement paper?\",\"answer\":\"It focuses on C programming concepts and related reasoning through multiple-choice questions, including pointers, macros, control flow, and basic data structures.\"},{\"question\":\"Which question types are included beyond pure C syntax?\",\"answer\":\"Besides code behavior questions, it includes operator/expression evaluation and data sufficiency problems that require determining whether given statements are enough to reach an answer.\"},{\"question\":\"How do the questions typically test C understanding?\",\"answer\":\"They test correctness of declarations, output of small programs, effects of casts and pointer arithmetic, and language rules such as switch controlling expression types and struct self-reference.\"}]","HCL Placement Papers - Section II-C Programming - C Questions | PDF",1790350498,73]