प्रश्न और उत्तर का अभ्यास करें

  • उत्तर देखेंउत्तर छिपाएं
  • Workspace

उत्तर :
व्याख्या :

When a function accepts a variable number of arguments , its prototype cannot provide any information about the number of arguments and type of those variable arguments. Hence the compiler cannot warn about the mismatches. The programmer must make sure that arguments match or must manually insert explicit typecast.

  • उत्तर देखेंउत्तर छिपाएं
  • Workspace

उत्तर :
व्याख्या :

4  4  2

प्र: What do the functions atoi(), itoa() and gcvt () do? Show how would you use them in a program. 1710 0

  • उत्तर देखेंउत्तर छिपाएं
  • Workspace

उत्तर :
व्याख्या :

atoi()         Converts a string to an integer. itoa()         Convert an integer to a string gcvt()        Converts a floating-point number to a string   #include "stdlib.h" main() {       char s[] = "12345";       char buffer [15], string[20];       int i;              i = atoi (s);       printf("\n%d",i);          gcvt (20.141672, 4, buffer);        printf ("\n%s", buffer);          itoa(15, string,2);         printf ("\n%s", string); }

प्र: How would you use qsort() function to sort an array of structures? 1663 0

  • उत्तर देखेंउत्तर छिपाएं
  • Workspace

उत्तर :
व्याख्या :

#include "string.h" #include "stdlib.h" struct stud {        int rollno;        int marks;        char name[30]; }; int sort_m (struct stud *, struct stud *); int sort_name (struct stud *, struct stud *); int sort_marks (struct stud *, struct stud *);   main() { static struct stud ss[] = {                                             { 15, 96, "Akshay" },                                             { 2, 97, "Madhuri" },                                             { 8, 85, "Aishvarya" },                                             { 10, 80, "Sushmita" }                                    }; int x,w; clrscr(); w = sizeof (struct stud);   printf ('\nIn order of roll numbers:"); qsort (ss, 4, w, sort_rn); for(x=0; x<4;x++)      printf ("\n%d%s%d", ss[x].rollno, ss[x].name,ss[x].marks);   printf("\n\nIn order of names:"); qsort(ss, 4, sort_name);   for (x=0; x<4;x++)       printf("\n%d%s%d",ss[x].rollno, ss[x].name,ss[x].marks); printf("\n\nIn order of marks:"); qsort(ss,4,w,sort_marks);   for (x=0;x<4;x++)       printf ("\n%d%s%d",ss[x].rollno,ss[x].name,ss[x].marks); } int sort_rn (struct stud *t1, struct stud *t2) {      return (t1->rollno-t2->rollno); }   int sort_name (struct stud *t1, struct stud *t2) {      return (strcmp(t1->name,t2->name)); } int sort_marks (struct stud *t1, struct stud *t2) {      return (t2->marks-t1->marks); }

प्र: How would you use the function memmove()? 929 0

  • उत्तर देखेंउत्तर छिपाएं
  • Workspace

उत्तर :
व्याख्या :

#include "mem.h" #include "alloc.h" main() {       int area;       char *dest;       char src[] = "Life is the camera and you are the target"                                   "so keep smiling always";       area = sizeof (src);       dest = malloc (area);       memmove (dest, src, area);       printf("\n%s", dest);       printf("\n%s",src); }

प्र: What's the difference between the functions rand(), random(), srand() and randomize()? 1000 0

  • उत्तर देखेंउत्तर छिपाएं
  • Workspace

उत्तर :
व्याख्या :

rand()  returns a random number random()  returns a random number in a specified range srand()  initialise a random number generator with a given seed value randomize()   initializes a random number generator with a random value based o time.

प्र: In Windows XP , what does the letter XP stands for? 2146 0

  • उत्तर देखेंउत्तर छिपाएं
  • Workspace

उत्तर :
व्याख्या :

The letters XP actually stands for eXPerience. It was designed as an enhancement of Windows 2000, with a totally different and more attractive user interface/console.

प्र: What is NTFS? 1673 0

  • उत्तर देखेंउत्तर छिपाएं
  • Workspace

उत्तर :
व्याख्या :

NTFS is short for New Technology File System. It is the standard file system that is being used by operating systems starting from Windows NT, Windows 2000, Windows XP, and even the newer versions like Vista and 7. It was originally designed to have a better performance on file storage and retrieval under the Windows NT family.

      त्रुटि की रिपोर्ट करें

    कृपया संदेश दर्ज करें
    त्रुटि रिपोर्ट सफलतापूर्वक जमा हुई

      त्रुटि की रिपोर्ट करें

    कृपया संदेश दर्ज करें
    त्रुटि रिपोर्ट सफलतापूर्वक जमा हुई

      त्रुटि की रिपोर्ट करें

    कृपया संदेश दर्ज करें
    त्रुटि रिपोर्ट सफलतापूर्वक जमा हुई

      त्रुटि की रिपोर्ट करें

    कृपया संदेश दर्ज करें
    त्रुटि रिपोर्ट सफलतापूर्वक जमा हुई

      त्रुटि की रिपोर्ट करें

    कृपया संदेश दर्ज करें
    त्रुटि रिपोर्ट सफलतापूर्वक जमा हुई

      त्रुटि की रिपोर्ट करें

    कृपया संदेश दर्ज करें
    त्रुटि रिपोर्ट सफलतापूर्वक जमा हुई

      त्रुटि की रिपोर्ट करें

    कृपया संदेश दर्ज करें
    त्रुटि रिपोर्ट सफलतापूर्वक जमा हुई

      त्रुटि की रिपोर्ट करें

    कृपया संदेश दर्ज करें
    त्रुटि रिपोर्ट सफलतापूर्वक जमा हुई