Anda di halaman 1dari 5

C- QUESTIONS 1. What does static variable mean? 2. What is a ointer? !. What is a str"ct"re? #.

What are the di$$erences bet%een str"ct"res and arra&s? '. In header $iles %hether $"nctions are declared or de$ined? (. What are the di$$erences bet%een malloc)* and calloc)*? +. What are macros? %hat are its advanta,es and disadvanta,es? -. .i$$erence bet%een ass b& re$erence and ass b& val"e? /. What is static identi$ier? 10. Where are the a"to variables stored? 11. Where does ,lobal1 static1 local1 re,ister variables1 $ree memor& and C 2ro,ram instr"ctions ,et stored? 12. .i$$erence bet%een arra&s and lin3ed list? 1!. What are en"merations? 1#. .escribe abo"t stora,e allocation and sco e o$ ,lobal1 e4tern1 static1 local and re,ister variables? 1'. What are re,ister variables? What are the advanta,e o$ "sin, re,ister variables? 1(. What is the "se o$ t& ede$? 1+. Can %e s eci$& variable $ield %idth in a scan$)* $ormat strin,? I$ ossible ho%? 1-. O"t o$ $,ets)* and ,ets)* %hich $"nction is sa$e to "se and %h&? 1/. .i$$erence bet%een strd" and strc &? 20. What is rec"rsion? 21. .i$$erentiate bet%een a $or loo and a %hile loo ? What are it "ses? 22. What are the di$$erent stora,e classes in C? 2!. Write do%n the e5"ivalent ointer e4 ression $or re$errin, the same element a6i76876376l7?

2#. 2'. 2(.

What is di$$erence bet%een Str"ct"re and Unions? What the advanta,es o$ "sin, Unions? What are the advanta,es o$ "sin, ointers in a ro,ram? 2+. What is the di$$erence bet%een Strin,s and 9rra&s? 2-. In a header $ile %hether $"nctions are declared or de$ined? 2/. What is a $ar ointer? %here %e "se it? !0. :o% %ill &o" declare an arra& o$ three $"nction ointers %here each $"nction receives t%o ints and ret"rns a $loat? !1. %hat is a NU;; 2ointer? Whether it is same as an "ninitiali<ed ointer? !2. What is a NU;; =acro? What is the di$$erence bet%een a NU;; 2ointer and a NU;; =acro? !!. What does the error >N"ll 2ointer 9ssi,nment> mean and %hat ca"ses this error? !#. What is near1 $ar and h",e ointers? :o% man& b&tes are occ" ied b& them? !'. :o% %o"ld &o" obtain se,ment and o$$set addresses $rom a $ar address o$ a memor& location? !(. 9re the e4 ressions arr and ?arr same $or an arra& o$ inte,ers? !+. .oes mentionin, the arra& name ,ives the base address in all the conte4ts? !-. E4 lain one method to rocess an entire strin, as one "nit? !/. What is the similarit& bet%een a Str"ct"re1 Union and en"meration? #0. Can a Str"ct"re contain a 2ointer to itsel$? #1. :o% can %e chec3 %hether the contents o$ t%o str"ct"re variables are same or not? #2. :o% are Str"ct"re assin, and ret"rnin, im lemented b& the com lier? #!. :o% can %e read@%rite Str"ct"res $rom@to data $iles?

##. What is the di$$erence bet%een an en"meration and a set o$ re- rocessor A de$ines? #'. %hat do the >c> and >v> in ar,c and ar,v stand $or? #(. 9re the variables ar,c and ar,v are local to main? #+. What is the ma4im"m combined len,th o$ command line ar,"ments incl"din, the s ace bet%een ad8acent ar,"ments? #-. I$ %e %ant that an& %ildcard characters in the command line ar,"ments sho"ld be a ro riatel& e4 anded1 are %e re5"ired to ma3e an& s ecial rovision? I$ &es1 %hich? #/. .oes there e4ist an& %a& to ma3e the command line ar,"ments available to other $"nctions %itho"t assin, them as ar,"ments to the $"nction? '0. What are bit $ields? What is the "se o$ bit $ields in a Str"ct"re declaration? '1. To %hich n"mberin, s&stem can the binar& n"mber 1101100100111100 be easil& converted to? '2. Which bit %ise o erator is s"itable $or chec3in, %hether a artic"lar bit is on or o$$? '!. Which bit %ise o erator is s"itable $or t"rnin, o$$ a artic"lar bit in a n"mber? '#. Which bit %ise o erator is s"itable $or "ttin, on a artic"lar bit in a n"mber? ''. Which bit %ise o erator is s"itable $or chec3in, %hether a artic"lar bit is on or o$$? '(. %hich one is e5"ivalent to m"lti l&in, b& 2B;e$t shi$tin, a n"mber b& 1 or ;e$t shi$tin, an "nsi,ned int or char b& 1? '+. Write a ro,ram to com are t%o strin,s %itho"t "sin, the strcm )* $"nction. '-. Write a ro,ram to concatenate t%o strin,s. '/. Write a ro,ram to interchan,e 2 variables %itho"t "sin, the third one. (0. Write ro,rams $or Strin, Ceversal ? 2alindrome chec3 (1. Write a ro,ram to $ind the Dactorial o$ a n"mber (2. Write a ro,ram to ,enerate the Dibinocci Series

(!. Write a ro,ram %hich em lo&s Cec"rsion (#. Write a ro,ram %hich "ses Command ;ine 9r,"ments ('. Write a ro,ram %hich "ses $"nctions li3e strcm )*1 strc &)*? etc ((. What are the advanta,es o$ "sin, t& ede$ in a ro,ram? (+. :o% %o"ld &o" d&namicall& allocate a onedimensional and t%o-dimensional arra& o$ inte,ers? (-. :o% can &o" increase the si<e o$ a d&namicall& allocated arra&? (/. :o% can &o" increase the si<e o$ a staticall& allocated arra&? +0. When reallocatin, memor& i$ an& other ointers oint into the same iece o$ memor& do &o" have to read8"st these other ointers or do the& ,et read8"sted a"tomaticall&? +1. Which $"nction sho"ld be "sed to $ree the memor& allocated b& calloc)*? +2. :o% m"ch ma4im"m can &o" allocate in a sin,le call to malloc)*? +!. Can &o" d&namicall& allocate arra&s in e4 anded memor&? +#. What is ob8ect $ile? :o% can &o" access ob8ect $ile? +'. Which header $ile sho"ld &o" incl"de i$ &o" are to develo a $"nction %hich can acce t variable n"mber o$ ar,"ments? +(. Can &o" %rite a $"nction similar to rint$)*? ++. :o% can a called $"nction determine the n"mber o$ ar,"ments that have been assed to it? +-. Can there be at least some sol"tion to determine the n"mber o$ ar,"ments assed to a variable ar,"ment list $"nction? +/. :o% do &o" declare the $ollo%in,B o 9n arra& o$ three ointers to chars o 9n arra& o$ three char ointers o 9 ointer to arra& o$ three chars

9 ointer to $"nction %hich receives an int ointer and ret"rns a $loat ointer o 9 ointer to a $"nction %hich receives nothin, and ret"rns nothin, -0. What do the $"nctions atoi)*1 itoa)* and ,cvt)* do? -1. .oes there e4ist an& other $"nction %hich can be "sed to convert an inte,er or a $loat to a strin,? -2. :o% %o"ld &o" "se 5sort)* $"nction to sort an arra& o$ str"ct"res? -!. :o% %o"ld &o" "se 5sort)* $"nction to sort the name stored in an arra& o$ ointers to strin,? -#. :o% %o"ld &o" "se bsearch)* $"nction to search a name stored in arra& o$ ointers to strin,? -'. :o% %o"ld &o" "se the $"nctions sin)*1 o%)*1 s5rt)*? -(. :o% %o"ld &o" "se the $"nctions memc &)*1 memset)*1 memmove)*? -+. :o% %o"ld &o" "se the $"nctions $see3)*1 $reed)*1 $%rite)* and $tell)*? --. :o% %o"ld &o" obtain the c"rrent time and di$$erence bet%een t%o times? -/. :o% %o"ld &o" "se the $"nctions randomi<e)* and random)*? /0. :o% %o"ld &o" im lement a s"bstr)* $"nction that e4tracts a s"b strin, $rom a ,iven strin,? /1. What is the di$$erence bet%een the $"nctions rand)*1 random)*1 srand)* and randomi<e)*? /2. What is the di$$erence bet%een the $"nctions memmove)* and memc &)*? /!. :o% do &o" rint a strin, on the rinter? /#. Can &o" "se the $"nction $ rint$)* to dis la& the o"t "t on the screen?
o

Anda mungkin juga menyukai