SlideShare a Scribd company logo
1 of 3
Swadeshi MicroprocessorQuiz2020 (Start-upIndia)
C problems:
1. Anagram(Checkingif twowordsare anagrams or not andignore case)
Ex: Stressedanddesserts - yes
#include <stdio.h>
int check_anagram(char [], char []);
void main()
{
char a[100], b[100];
int flag;
printf("Enter first stringn");
gets(a);
printf("Enter second stringn");
gets(b);
flag = anagram_checker(a, b);
if (flag == 1)
printf(""%s" and "%s" are anagrams.n", a, b);
else
printf(""%s" and "%s" are not anagrams.n", a, b);
getch();
}
int anagram_checker(char s1[], char s2[])
{
int first[26] = {0}, second[26] = {0}, c = 0;
int i;
for(i=0; s1[i] != '0'; i++)
{
s1[i] = tolower(s1[i]);
}
for(i=0; s2[i] != '0'; i++)
{
s2[i] = tolower(s2[i]);
}
while (s1[c] != '0')
{
first[s1[c]-'a']++;
c++;
}
c = 0;
while (s2[c] != '0')
{
second[s2[c]-'a']++;
c++;
}
for (c = 0; c < 26; c++)
{
if (first[c] != second[c])
return 0;
}
return 1;
}
2. Convertdecimal tohexadecimal
#include <stdio.h>
int main()
{
int num;
printf("Enter decimal number: ");
scanf("%d", &num);
decimal_to_hexa(num);
return 0;
}
void decimal_to_hexa(int num){
int i=0, j = 0;
long remainder, quotient;
char hexadecimalnum[100];
quotient = num;
while (quotient != 0)
{
remainder = quotient % 16;
if (remainder < 10)
hexadecimalnum[j++] = 48 + remainder;
else
hexadecimalnum[j++] = 55 + remainder;
quotient = quotient / 16;
}
// display integer into character
for (i = j-1; i >= 0; i--)
printf("%c", hexadecimalnum[i]);
}
3. Factorial
Input- testcasesscansnumberof testcasesfor factorial,thenenterthe numberforeach
factorial
Ex-
2
2
4
Output- Factorial of twonumbers:2->2 , 4->24
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int factorial(int num)
{
// Please write your code in this function
int factorial = 1;
while(num){
factorial*=num;
num-=1;
}
return factorial;
}
int main(){
int testcases, num;
int result;
scanf("%d", &testcases);
while(testcases){
scanf("%d", &num);
result = factorial(num);
printf("%dn", result);
testcases--;
}
}

More Related Content

What's hot

Bti1022 lab sheet 8
Bti1022 lab sheet 8Bti1022 lab sheet 8
Bti1022 lab sheet 8alish sha
 
Printing different pyramid patterns of numbers,alphabets and stars using C.
Printing different pyramid patterns of numbers,alphabets and stars using C.Printing different pyramid patterns of numbers,alphabets and stars using C.
Printing different pyramid patterns of numbers,alphabets and stars using C.Hazrat Bilal
 
Bcsl 033 data and file structures lab s1-1
Bcsl 033 data and file structures lab s1-1Bcsl 033 data and file structures lab s1-1
Bcsl 033 data and file structures lab s1-1Dr. Loganathan R
 
Let us c chapter 4 solution
Let us c chapter 4 solutionLet us c chapter 4 solution
Let us c chapter 4 solutionrohit kumar
 
Dti2143 lab sheet 9
Dti2143 lab sheet 9Dti2143 lab sheet 9
Dti2143 lab sheet 9alish sha
 
Program in ‘C’ language to implement linear search using pointers
Program in ‘C’ language to implement linear search using pointersProgram in ‘C’ language to implement linear search using pointers
Program in ‘C’ language to implement linear search using pointersDr. Loganathan R
 
Bcsl 033 data and file structures lab s3-3
Bcsl 033 data and file structures lab s3-3Bcsl 033 data and file structures lab s3-3
Bcsl 033 data and file structures lab s3-3Dr. Loganathan R
 
Bcsl 033 data and file structures lab s5-3
Bcsl 033 data and file structures lab s5-3Bcsl 033 data and file structures lab s5-3
Bcsl 033 data and file structures lab s5-3Dr. Loganathan R
 
C program to check leap year
C program to check leap year C program to check leap year
C program to check leap year mohdshanu
 
Bcsl 033 data and file structures lab s3-1
Bcsl 033 data and file structures lab s3-1Bcsl 033 data and file structures lab s3-1
Bcsl 033 data and file structures lab s3-1Dr. Loganathan R
 
C Language Programs
C Language Programs C Language Programs
C Language Programs Mansi Tyagi
 
Prime number program in c
Prime number program in cPrime number program in c
Prime number program in cHitesh Kumar
 

What's hot (15)

Bti1022 lab sheet 8
Bti1022 lab sheet 8Bti1022 lab sheet 8
Bti1022 lab sheet 8
 
Printing different pyramid patterns of numbers,alphabets and stars using C.
Printing different pyramid patterns of numbers,alphabets and stars using C.Printing different pyramid patterns of numbers,alphabets and stars using C.
Printing different pyramid patterns of numbers,alphabets and stars using C.
 
Bcsl 033 data and file structures lab s1-1
Bcsl 033 data and file structures lab s1-1Bcsl 033 data and file structures lab s1-1
Bcsl 033 data and file structures lab s1-1
 
Spiral array
Spiral arraySpiral array
Spiral array
 
Let us c chapter 4 solution
Let us c chapter 4 solutionLet us c chapter 4 solution
Let us c chapter 4 solution
 
Dti2143 lab sheet 9
Dti2143 lab sheet 9Dti2143 lab sheet 9
Dti2143 lab sheet 9
 
2 d rotation
2 d rotation2 d rotation
2 d rotation
 
Program in ‘C’ language to implement linear search using pointers
Program in ‘C’ language to implement linear search using pointersProgram in ‘C’ language to implement linear search using pointers
Program in ‘C’ language to implement linear search using pointers
 
Bcsl 033 data and file structures lab s3-3
Bcsl 033 data and file structures lab s3-3Bcsl 033 data and file structures lab s3-3
Bcsl 033 data and file structures lab s3-3
 
Bcsl 033 data and file structures lab s5-3
Bcsl 033 data and file structures lab s5-3Bcsl 033 data and file structures lab s5-3
Bcsl 033 data and file structures lab s5-3
 
1 (1)
1 (1)1 (1)
1 (1)
 
C program to check leap year
C program to check leap year C program to check leap year
C program to check leap year
 
Bcsl 033 data and file structures lab s3-1
Bcsl 033 data and file structures lab s3-1Bcsl 033 data and file structures lab s3-1
Bcsl 033 data and file structures lab s3-1
 
C Language Programs
C Language Programs C Language Programs
C Language Programs
 
Prime number program in c
Prime number program in cPrime number program in c
Prime number program in c
 

Similar to Swadeshi Microprocessor Quiz 2020 (Start-up India)

Similar to Swadeshi Microprocessor Quiz 2020 (Start-up India) (20)

Basic C Programming Lab Practice
Basic C Programming Lab PracticeBasic C Programming Lab Practice
Basic C Programming Lab Practice
 
C lab manaual
C lab manaualC lab manaual
C lab manaual
 
C Prog. - Strings (Updated)
C Prog. - Strings (Updated)C Prog. - Strings (Updated)
C Prog. - Strings (Updated)
 
C Programming lab
C Programming labC Programming lab
C Programming lab
 
LET US C (5th EDITION) CHAPTER 2 ANSWERS
LET US C (5th EDITION) CHAPTER 2 ANSWERSLET US C (5th EDITION) CHAPTER 2 ANSWERS
LET US C (5th EDITION) CHAPTER 2 ANSWERS
 
ADA FILE
ADA FILEADA FILE
ADA FILE
 
C Prog - Strings
C Prog - StringsC Prog - Strings
C Prog - Strings
 
Chapter 8 c solution
Chapter 8 c solutionChapter 8 c solution
Chapter 8 c solution
 
Arrays
ArraysArrays
Arrays
 
C programs Set 2
C programs Set 2C programs Set 2
C programs Set 2
 
Data Structure in C Programming Language
Data Structure in C Programming LanguageData Structure in C Programming Language
Data Structure in C Programming Language
 
C programming
C programmingC programming
C programming
 
Cpd lecture im 207
Cpd lecture im 207Cpd lecture im 207
Cpd lecture im 207
 
C programms
C programmsC programms
C programms
 
C programming
C programmingC programming
C programming
 
SaraPIC
SaraPICSaraPIC
SaraPIC
 
Unit 3 Input Output.pptx
Unit 3 Input Output.pptxUnit 3 Input Output.pptx
Unit 3 Input Output.pptx
 
All important c programby makhan kumbhkar
All important c programby makhan kumbhkarAll important c programby makhan kumbhkar
All important c programby makhan kumbhkar
 
C file
C fileC file
C file
 
ภาษาซี
ภาษาซีภาษาซี
ภาษาซี
 

More from PARNIKA GUPTA

INTEGRATION_ASPECTS_OF_TELEMETRY_SYSTEM_FOR_A_SURVEILLANCE_UAV.pdf
INTEGRATION_ASPECTS_OF_TELEMETRY_SYSTEM_FOR_A_SURVEILLANCE_UAV.pdfINTEGRATION_ASPECTS_OF_TELEMETRY_SYSTEM_FOR_A_SURVEILLANCE_UAV.pdf
INTEGRATION_ASPECTS_OF_TELEMETRY_SYSTEM_FOR_A_SURVEILLANCE_UAV.pdfPARNIKA GUPTA
 
Cypherock Assessment (1).pdf
Cypherock Assessment (1).pdfCypherock Assessment (1).pdf
Cypherock Assessment (1).pdfPARNIKA GUPTA
 
IISC CPDM Task 2 Report
IISC CPDM Task 2 ReportIISC CPDM Task 2 Report
IISC CPDM Task 2 ReportPARNIKA GUPTA
 
IISC CPDM Task 1 Report
IISC CPDM Task 1 ReportIISC CPDM Task 1 Report
IISC CPDM Task 1 ReportPARNIKA GUPTA
 
Remote sensing and gis based identification of hazardous
Remote sensing and gis based identification of hazardousRemote sensing and gis based identification of hazardous
Remote sensing and gis based identification of hazardousPARNIKA GUPTA
 
Beam forming- New Technology
Beam forming- New TechnologyBeam forming- New Technology
Beam forming- New TechnologyPARNIKA GUPTA
 
LoRa application for detecting the harmful gases
LoRa application for detecting the harmful gasesLoRa application for detecting the harmful gases
LoRa application for detecting the harmful gasesPARNIKA GUPTA
 
Human Computer Interface Glove for Sign Language Translation
Human Computer Interface Glove for Sign Language TranslationHuman Computer Interface Glove for Sign Language Translation
Human Computer Interface Glove for Sign Language TranslationPARNIKA GUPTA
 
GIS application in Defense
GIS application in DefenseGIS application in Defense
GIS application in DefensePARNIKA GUPTA
 
Transceiver System requirement specifications for 20 km range UAV video datalink
Transceiver System requirement specifications for 20 km range UAV video datalinkTransceiver System requirement specifications for 20 km range UAV video datalink
Transceiver System requirement specifications for 20 km range UAV video datalinkPARNIKA GUPTA
 
HAPTIC SUIT- Project Report(2018)
HAPTIC SUIT- Project Report(2018)HAPTIC SUIT- Project Report(2018)
HAPTIC SUIT- Project Report(2018)PARNIKA GUPTA
 
HAPTIC SUIT presentation (2018)
HAPTIC SUIT presentation (2018) HAPTIC SUIT presentation (2018)
HAPTIC SUIT presentation (2018) PARNIKA GUPTA
 

More from PARNIKA GUPTA (12)

INTEGRATION_ASPECTS_OF_TELEMETRY_SYSTEM_FOR_A_SURVEILLANCE_UAV.pdf
INTEGRATION_ASPECTS_OF_TELEMETRY_SYSTEM_FOR_A_SURVEILLANCE_UAV.pdfINTEGRATION_ASPECTS_OF_TELEMETRY_SYSTEM_FOR_A_SURVEILLANCE_UAV.pdf
INTEGRATION_ASPECTS_OF_TELEMETRY_SYSTEM_FOR_A_SURVEILLANCE_UAV.pdf
 
Cypherock Assessment (1).pdf
Cypherock Assessment (1).pdfCypherock Assessment (1).pdf
Cypherock Assessment (1).pdf
 
IISC CPDM Task 2 Report
IISC CPDM Task 2 ReportIISC CPDM Task 2 Report
IISC CPDM Task 2 Report
 
IISC CPDM Task 1 Report
IISC CPDM Task 1 ReportIISC CPDM Task 1 Report
IISC CPDM Task 1 Report
 
Remote sensing and gis based identification of hazardous
Remote sensing and gis based identification of hazardousRemote sensing and gis based identification of hazardous
Remote sensing and gis based identification of hazardous
 
Beam forming- New Technology
Beam forming- New TechnologyBeam forming- New Technology
Beam forming- New Technology
 
LoRa application for detecting the harmful gases
LoRa application for detecting the harmful gasesLoRa application for detecting the harmful gases
LoRa application for detecting the harmful gases
 
Human Computer Interface Glove for Sign Language Translation
Human Computer Interface Glove for Sign Language TranslationHuman Computer Interface Glove for Sign Language Translation
Human Computer Interface Glove for Sign Language Translation
 
GIS application in Defense
GIS application in DefenseGIS application in Defense
GIS application in Defense
 
Transceiver System requirement specifications for 20 km range UAV video datalink
Transceiver System requirement specifications for 20 km range UAV video datalinkTransceiver System requirement specifications for 20 km range UAV video datalink
Transceiver System requirement specifications for 20 km range UAV video datalink
 
HAPTIC SUIT- Project Report(2018)
HAPTIC SUIT- Project Report(2018)HAPTIC SUIT- Project Report(2018)
HAPTIC SUIT- Project Report(2018)
 
HAPTIC SUIT presentation (2018)
HAPTIC SUIT presentation (2018) HAPTIC SUIT presentation (2018)
HAPTIC SUIT presentation (2018)
 

Recently uploaded

Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 

Recently uploaded (20)

Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 

Swadeshi Microprocessor Quiz 2020 (Start-up India)

  • 1. Swadeshi MicroprocessorQuiz2020 (Start-upIndia) C problems: 1. Anagram(Checkingif twowordsare anagrams or not andignore case) Ex: Stressedanddesserts - yes #include <stdio.h> int check_anagram(char [], char []); void main() { char a[100], b[100]; int flag; printf("Enter first stringn"); gets(a); printf("Enter second stringn"); gets(b); flag = anagram_checker(a, b); if (flag == 1) printf(""%s" and "%s" are anagrams.n", a, b); else printf(""%s" and "%s" are not anagrams.n", a, b); getch(); } int anagram_checker(char s1[], char s2[]) { int first[26] = {0}, second[26] = {0}, c = 0; int i; for(i=0; s1[i] != '0'; i++) { s1[i] = tolower(s1[i]); } for(i=0; s2[i] != '0'; i++) { s2[i] = tolower(s2[i]); } while (s1[c] != '0') { first[s1[c]-'a']++; c++; } c = 0; while (s2[c] != '0') { second[s2[c]-'a']++; c++; } for (c = 0; c < 26; c++) { if (first[c] != second[c]) return 0; } return 1; }
  • 2. 2. Convertdecimal tohexadecimal #include <stdio.h> int main() { int num; printf("Enter decimal number: "); scanf("%d", &num); decimal_to_hexa(num); return 0; } void decimal_to_hexa(int num){ int i=0, j = 0; long remainder, quotient; char hexadecimalnum[100]; quotient = num; while (quotient != 0) { remainder = quotient % 16; if (remainder < 10) hexadecimalnum[j++] = 48 + remainder; else hexadecimalnum[j++] = 55 + remainder; quotient = quotient / 16; } // display integer into character for (i = j-1; i >= 0; i--) printf("%c", hexadecimalnum[i]); } 3. Factorial Input- testcasesscansnumberof testcasesfor factorial,thenenterthe numberforeach factorial Ex- 2 2 4 Output- Factorial of twonumbers:2->2 , 4->24 #include <stdio.h> #include <stdlib.h> #include <string.h> int factorial(int num) { // Please write your code in this function int factorial = 1; while(num){ factorial*=num; num-=1; } return factorial; } int main(){
  • 3. int testcases, num; int result; scanf("%d", &testcases); while(testcases){ scanf("%d", &num); result = factorial(num); printf("%dn", result); testcases--; } }