SlideShare a Scribd company logo
RAMCO 'C'                        QUESTION PAPER
1).
main()
{
         char *p1="Name";
         char *p2;
         p2=(char *)malloc(20);
         while(*p2++=*p1++);
         printf("%sn",p2);
}

Ans : An empty String

2).
--------------------------------------------------------------

main()
{
         int x=20,y=35;
         x = y++ + x++;
         y = ++y + ++x;
         printf("%d %dn",x,y);
}

Ans 57 94



3).
--------------------------------------------------------------



main()
{
         int x=5;
         printf("%d %d %dn",x,x<<2,x>>2);
}

Ans 5 20 1




4).
-----------------------------------------------------------------
#define swap1(a,b) a=a+b;b=a-b;a=a-b;
main()
{
       int x=5,y=10;
       swap1(x,y);
       printf("%d %dn",x,y);
       swap2(x,y);
       printf("%d %dn",x,y);
}

int swap2(int a,int b)
{
       int temp;
       temp=a;
       b=a;
       a=temp;
       return;
}

Ans             10 5
              10 5



5).
--------------------------------------------------------------



main()
{
         char *ptr = "Ramco Systems";
         (*ptr)++;
         printf("%sn",ptr);
         ptr++;
         printf("%sn",ptr);
}
 Ans       Samco Systems
          amco Systems

6).
--------------------------------------------------------------

#include<stdio.h>
main()
{
       char s1[]="Ramco";
char s2[]="Systems";
        s1=s2;
        printf("%s",s1);
}

Ans     Compilation error giving it cannot be an modifible 'lvalue'




7).
--------------------------------------------------------------

#include<stdio.h>
main()
{
       char *p1;
       char *p2;
       p1=(char *) malloc(25);
       p2=(char *) malloc(25);
       strcpy(p1,"Ramco");
       strcpy(p2,"Systems");
       strcat(p1,p2);
       printf("%s",p1);
}



Ans : RamcoSystems




8).
--------------------------------------------------------------

[1]. The following variable is available in file1.c



static int average_float;

Ans        all the functions in the file1.c can access the variable




9).
--------------------------------------------------------------
Ans     :     [2]. extern int x;

        Check the answer




10).
--------------------------------------------------------------
[3]. Another Problem with

        # define TRUE 0

        some code

        while(TRUE)
        {
              some code

        }



        This won't go into the loop as TRUE is defined as 0
        Ans NONE OF THE ABOVE i.e D




11).
--------------------------------------------------------------
Ans : [4]. A question in structures where the memebers are dd,mm,yy.

        mm:dd:yy
        09:07:97




12).
--------------------------------------------------------------
Ans : [5]. Another structure question

        1 Rajiv System Analyst
13).
--------------------------------------------------------------

Answer

        INFILE.DAT is copied to OUTFILE.DAT




14).
--------------------------------------------------------------

A question with argc and argv .

        Input will be

        c:TEMP.EXE Ramco Systems India

        Output will be

                India: I n d i a
                Systems: S y s t e m s
                Ramco: R a m c o

        Answer is choice d




15).
--------------------------------------------------------------

Structure swap

        Ramco India
        Ramco Systems Corporation
        Ramco ... Limited .

        After swapping the result will be

        First two will be swapped.

        Ramco Systems Corporation
        Ramco India
        Ramco ... Limited .
16).
--------------------------------------------------------------

int x;
main()
{
         int x=0;
         {
                 int x=10;
                 x++;
                 change_value(x);
                 x++;
                 Modify_value();
                 printf("First output: %dn",x);
         }
         x++;
         change_value(x);
         printf("Second Output : %dn",x);
         Modify_value();
         printf("Third Output : %dn",x);
}

Modify_value()
{
      return (x+=10);
}

change_value()
{
     return(x+=1);
}




Ans : 12          1      1
17).
--------------------------------------------------------------




main()
{
         int x=10,y=15;
         x=x++;
         y=++y;
         printf("%d %dn",x,y);
}



Ans : 11        16




18).
--------------------------------------------------------------



main()
{
         int a=0;
         if(a=0) printf("Ramco Systemsn");
         printf("Ramco Systemsn");
}

Ans : Ony one time
           "Ramco Systems"
                 will be printed

&nbsp;
______________________________________________
&nbsp;

More Related Content

PPTX
C PROGRAMS - SARASWATHI RAMALINGAM
DOC
TXT
Ativaçao de frame
PDF
Org Beamer
TXT
Interfaz Grafica En Java
PDF
Homework 1 of Optical Semiconductor
PDF
Functional Programming inside OOP? It’s possible with Python
PDF
AST: threats and opportunities
C PROGRAMS - SARASWATHI RAMALINGAM
Ativaçao de frame
Org Beamer
Interfaz Grafica En Java
Homework 1 of Optical Semiconductor
Functional Programming inside OOP? It’s possible with Python
AST: threats and opportunities

What's hot (20)

PDF
C++ Programming - 14th Study
PPTX
Scilab presentation
PDF
CRL 1.8 functions MrG 2011.0920 - sage
PDF
CRL 1.8 Functions
PPT
PDF
Linked list int_data_fdata
PDF
Pt 3 xii cs final
PPT
zen and the art of SQL optimization
PPTX
A quick introduction to R
PPTX
CQL 实现
PPT
Link list part 2
DOCX
Wap to implement bitwise operators
PDF
Swift the implicit parts
PDF
Python 1 liners
PPTX
Sketching derivatives
PPTX
2.2 stack applications Infix to Postfix & Evaluation of Post Fix
DOCX
FishersEquationCode
PDF
R演習補講 (2腕バンディット問題を題材に)
TXT
Snake.c
PDF
SPSF03 - Numerical Integrations
C++ Programming - 14th Study
Scilab presentation
CRL 1.8 functions MrG 2011.0920 - sage
CRL 1.8 Functions
Linked list int_data_fdata
Pt 3 xii cs final
zen and the art of SQL optimization
A quick introduction to R
CQL 实现
Link list part 2
Wap to implement bitwise operators
Swift the implicit parts
Python 1 liners
Sketching derivatives
2.2 stack applications Infix to Postfix & Evaluation of Post Fix
FishersEquationCode
R演習補講 (2腕バンディット問題を題材に)
Snake.c
SPSF03 - Numerical Integrations
Ad

Similar to Ramco C Question Paper 2003 (20)

DOC
Ramco Sample Paper 2003
DOCX
PDF
Basic C Programming Lab Practice
PDF
sodapdf-converted into ppt presentation(1).pdf
DOC
C tech questions
DOCX
Bti1022 lab sheet 7
PDF
C lab programs
PDF
C lab programs
PPT
C questions
DOCX
Fuzail_File_C.docx
PDF
C- Programming Assignment practice set 2 solutions
DOCX
C interview question answer 2
PPTX
C language
PPT
Unit3 C
PPTX
Mcs011 solved assignment by divya singh
PDF
The best every notes on c language is here check it out
PPTX
C LANGUAGE.pptx
PPTX
C LANGUAGE.pptx
PPTX
Introduction to Basic C programming 02
Ramco Sample Paper 2003
Basic C Programming Lab Practice
sodapdf-converted into ppt presentation(1).pdf
C tech questions
Bti1022 lab sheet 7
C lab programs
C lab programs
C questions
Fuzail_File_C.docx
C- Programming Assignment practice set 2 solutions
C interview question answer 2
C language
Unit3 C
Mcs011 solved assignment by divya singh
The best every notes on c language is here check it out
C LANGUAGE.pptx
C LANGUAGE.pptx
Introduction to Basic C programming 02
Ad

More from ncct (20)

PDF
Biomedical Wearable Device For Remote Monitoring Ofphysiological Signals
PDF
Digital Water Marking For Video Piracy Detection
PDF
Self Repairing Tree Topology Enabling Content Based Routing In Local Area Ne...
PDF
Cockpit White Box
PDF
Rail Track Inspector
PDF
Botminer Clustering Analysis Of Network Traffic For Protocol And Structure...
PDF
Bot Robo Tanker Sound Detector
PDF
Distance Protection
PDF
Bluetooth Jammer
PDF
Crypkit 1
PDF
I E E E 2009 Java Projects
PDF
B E Projects M C A Projects B
PDF
J2 E E Projects, I E E E Projects 2009
PDF
J2 M E Projects, I E E E Projects 2009
PDF
Engineering College Projects, M C A Projects, B E Projects, B Tech Pr...
PDF
B E M E Projects M C A Projects B
PDF
I E E E 2009 Java Projects, I E E E 2009 A S P
PDF
Advantages Of Software Projects N C C T
PDF
Engineering Projects
PDF
Software Projects Java Projects Mobile Computing
Biomedical Wearable Device For Remote Monitoring Ofphysiological Signals
Digital Water Marking For Video Piracy Detection
Self Repairing Tree Topology Enabling Content Based Routing In Local Area Ne...
Cockpit White Box
Rail Track Inspector
Botminer Clustering Analysis Of Network Traffic For Protocol And Structure...
Bot Robo Tanker Sound Detector
Distance Protection
Bluetooth Jammer
Crypkit 1
I E E E 2009 Java Projects
B E Projects M C A Projects B
J2 E E Projects, I E E E Projects 2009
J2 M E Projects, I E E E Projects 2009
Engineering College Projects, M C A Projects, B E Projects, B Tech Pr...
B E M E Projects M C A Projects B
I E E E 2009 Java Projects, I E E E 2009 A S P
Advantages Of Software Projects N C C T
Engineering Projects
Software Projects Java Projects Mobile Computing

Recently uploaded (20)

PPTX
New Microsoft PowerPoint Presentation - Copy.pptx
PDF
SIMNET Inc – 2023’s Most Trusted IT Services & Solution Provider
PDF
Types of control:Qualitative vs Quantitative
PPT
Data mining for business intelligence ch04 sharda
PDF
COST SHEET- Tender and Quotation unit 2.pdf
PDF
How to Get Funding for Your Trucking Business
PPTX
job Avenue by vinith.pptxvnbvnvnvbnvbnbmnbmbh
PDF
Ôn tập tiếng anh trong kinh doanh nâng cao
PPTX
Dragon_Fruit_Cultivation_in Nepal ppt.pptx
PDF
Training And Development of Employee .pdf
PDF
Reconciliation AND MEMORANDUM RECONCILATION
PDF
DOC-20250806-WA0002._20250806_112011_0000.pdf
PPTX
HR Introduction Slide (1).pptx on hr intro
PPTX
Probability Distribution, binomial distribution, poisson distribution
DOCX
unit 2 cost accounting- Tender and Quotation & Reconciliation Statement
PDF
BsN 7th Sem Course GridNNNNNNNN CCN.pdf
PDF
kom-180-proposal-for-a-directive-amending-directive-2014-45-eu-and-directive-...
PPTX
Belch_12e_PPT_Ch18_Accessible_university.pptx
PDF
Roadmap Map-digital Banking feature MB,IB,AB
PPTX
Principles of Marketing, Industrial, Consumers,
New Microsoft PowerPoint Presentation - Copy.pptx
SIMNET Inc – 2023’s Most Trusted IT Services & Solution Provider
Types of control:Qualitative vs Quantitative
Data mining for business intelligence ch04 sharda
COST SHEET- Tender and Quotation unit 2.pdf
How to Get Funding for Your Trucking Business
job Avenue by vinith.pptxvnbvnvnvbnvbnbmnbmbh
Ôn tập tiếng anh trong kinh doanh nâng cao
Dragon_Fruit_Cultivation_in Nepal ppt.pptx
Training And Development of Employee .pdf
Reconciliation AND MEMORANDUM RECONCILATION
DOC-20250806-WA0002._20250806_112011_0000.pdf
HR Introduction Slide (1).pptx on hr intro
Probability Distribution, binomial distribution, poisson distribution
unit 2 cost accounting- Tender and Quotation & Reconciliation Statement
BsN 7th Sem Course GridNNNNNNNN CCN.pdf
kom-180-proposal-for-a-directive-amending-directive-2014-45-eu-and-directive-...
Belch_12e_PPT_Ch18_Accessible_university.pptx
Roadmap Map-digital Banking feature MB,IB,AB
Principles of Marketing, Industrial, Consumers,

Ramco C Question Paper 2003

  • 1. RAMCO 'C' QUESTION PAPER 1). main() { char *p1="Name"; char *p2; p2=(char *)malloc(20); while(*p2++=*p1++); printf("%sn",p2); } Ans : An empty String 2). -------------------------------------------------------------- main() { int x=20,y=35; x = y++ + x++; y = ++y + ++x; printf("%d %dn",x,y); } Ans 57 94 3). -------------------------------------------------------------- main() { int x=5; printf("%d %d %dn",x,x<<2,x>>2); } Ans 5 20 1 4). -----------------------------------------------------------------
  • 2. #define swap1(a,b) a=a+b;b=a-b;a=a-b; main() { int x=5,y=10; swap1(x,y); printf("%d %dn",x,y); swap2(x,y); printf("%d %dn",x,y); } int swap2(int a,int b) { int temp; temp=a; b=a; a=temp; return; } Ans 10 5 10 5 5). -------------------------------------------------------------- main() { char *ptr = "Ramco Systems"; (*ptr)++; printf("%sn",ptr); ptr++; printf("%sn",ptr); } Ans Samco Systems amco Systems 6). -------------------------------------------------------------- #include<stdio.h> main() { char s1[]="Ramco";
  • 3. char s2[]="Systems"; s1=s2; printf("%s",s1); } Ans Compilation error giving it cannot be an modifible 'lvalue' 7). -------------------------------------------------------------- #include<stdio.h> main() { char *p1; char *p2; p1=(char *) malloc(25); p2=(char *) malloc(25); strcpy(p1,"Ramco"); strcpy(p2,"Systems"); strcat(p1,p2); printf("%s",p1); } Ans : RamcoSystems 8). -------------------------------------------------------------- [1]. The following variable is available in file1.c static int average_float; Ans all the functions in the file1.c can access the variable 9). --------------------------------------------------------------
  • 4. Ans : [2]. extern int x; Check the answer 10). -------------------------------------------------------------- [3]. Another Problem with # define TRUE 0 some code while(TRUE) { some code } This won't go into the loop as TRUE is defined as 0 Ans NONE OF THE ABOVE i.e D 11). -------------------------------------------------------------- Ans : [4]. A question in structures where the memebers are dd,mm,yy. mm:dd:yy 09:07:97 12). -------------------------------------------------------------- Ans : [5]. Another structure question 1 Rajiv System Analyst
  • 5. 13). -------------------------------------------------------------- Answer INFILE.DAT is copied to OUTFILE.DAT 14). -------------------------------------------------------------- A question with argc and argv . Input will be c:TEMP.EXE Ramco Systems India Output will be India: I n d i a Systems: S y s t e m s Ramco: R a m c o Answer is choice d 15). -------------------------------------------------------------- Structure swap Ramco India Ramco Systems Corporation Ramco ... Limited . After swapping the result will be First two will be swapped. Ramco Systems Corporation Ramco India Ramco ... Limited .
  • 6. 16). -------------------------------------------------------------- int x; main() { int x=0; { int x=10; x++; change_value(x); x++; Modify_value(); printf("First output: %dn",x); } x++; change_value(x); printf("Second Output : %dn",x); Modify_value(); printf("Third Output : %dn",x); } Modify_value() { return (x+=10); } change_value() { return(x+=1); } Ans : 12 1 1
  • 7. 17). -------------------------------------------------------------- main() { int x=10,y=15; x=x++; y=++y; printf("%d %dn",x,y); } Ans : 11 16 18). -------------------------------------------------------------- main() { int a=0; if(a=0) printf("Ramco Systemsn"); printf("Ramco Systemsn"); } Ans : Ony one time "Ramco Systems" will be printed &nbsp; ______________________________________________ &nbsp;